on a2a6ef5 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`, `tools/type-import-overlap-test`, `tools/type-import-structural-test`, `tools/type-generic-recursion-test`, `tools/type-generic-construction-test`, `tools/type-generic-pattern-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.
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.
46
46
47### The doc's examples
47### The doc's examples
48
48
docs/compiler.md+9−73
@@ -56,81 +56,27 @@ The core is split into chapters, `+| %name`, in this order:
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
58
58
59−The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. Literal heads compare by their runtime noun, so `|=%$` can construct an explicit null-, loobean-zero- or term-zero-headed case. Equal heads with distinct payloads can be selected when exactly one payload fit is proven; unknown or ambiguous alternatives remain unsupported. Unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. Generic unions declared directly inside a body and recursive molds outside the source-proven slices described below remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types and the source-bound gate-sample proof below. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
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.
60−
61−A direct unshadowed prelude call can use checked source layouts when a positional argument is a directly named, already inferred root gate. For two-slot function samples, the checker can match a named update against an unnamed generic gate sample without confusing a binder face with a nested record face. Both explicitly named slots must agree; source boundaries are evidence for this fit, not a call-arity rule. The source gate and prelude annotation must be available from their checked bindings. Local or dynamic gates, aliases without direct evidence, recursive or SCC placeholder bodies, other sample shapes and unresolved call-sample variables remain unsupported by this proof. Ordinary inference remains the fallback.
62−
63−The checker retains a per-analysis index of finalized root gates and a prelude source table bound to the entire trusted prepared interface. A dependency screen avoids building the table when the root cannot use it; changing the interface invalidates it. The host remains responsible for supplying a prepared interface paired with its source. The matcher checks each slot and product in both directions with a shared substitution. Before returning its tentative proof it requires both complete call samples to normalize to closed, tag-free types, then repeats every slot check and requires the substitution and fresh-ID counter to remain unchanged. This keeps later argument or enclosing constraints from invalidating an earlier face check, and preserves pending constraints, capital checks and projection evidence. These scans and the bounded second proof add work; they do not establish a global linear-time bound.
64−
65−Before the empty-capital optimization below, single sequential eval runs including startup showed that 2,000 ordinary gates used 70.20 seconds of user CPU at baseline and 70.64 seconds with the cached source table. Fifty unsupported eligible scalar-slot calls used 24.75 and 25.71 seconds, while fifty function-slot failures used 24.15 and 25.36 seconds. Fifty successful calls took 26.56 seconds before the final stability replay and 26.99 seconds with it. These are synthetic measurements, not production performance limits.
66−
67−Restricted-number promotion only applies to written capital variables. If none are present, it returns immediately instead of traversing the environment. In one startup-inclusive pair of runs on 2,000 independent gates, output was byte-identical and user CPU fell from 71.67 to 38.26 seconds; wall time was 72.80 versus 51.66 seconds while other checks were running. This does not establish a bound for dependent modules or a complete-checker benchmark.
68−
69−A 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.
70−
71−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.
72−
73−The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
74−
75−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.
76−
77−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.
78
60
79For 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.
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.
80
62
81−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.
82−
83−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.
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.
84−
85−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.
86−
87−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.
88
64
89A 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.
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.
90
66
91−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.
92−
93A 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.
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.
94
68
95−The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. Source-proved tagged unions can also be wrapped in Hoon `$~` defaults, including a downstream union using Tlon `epic.saga`; the selected source and projected branches still undergo the same provenance and disjointness checks. The tagged-source helper peels up to four consecutive default wrappers, while default wrappers encountered inside dependency proofs consume the existing semantic-node budget. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
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.
96−
97−An import-free Jibb library can export an opaque single-parameter recursive identity when its source has exactly two distinct term-tagged cases: a text leaf and a node containing `(list (name M))`, optionally with one `$-(@t M)` event field. A module-local index records the exact parsed source, defining path and prepared prelude interface; it is shared across that module's inference passes, and its canonical `list` must be source-backed. The normal resolver publishes an interface only after all ordinary mold and value checks succeed. Same-origin aliases retain the defining identity and independently instantiate type arguments; distinct origins remain unsupported. The opaque identity is conservatively treated as gate-bearing for numeric defaulting, and gate-freedom remains unknown. Explicit literal-headed construction uses a source-proven one-layer view: the event result receives the existing type argument and recursive children keep the defining identity. It consumes the existing shared 256-step recursive inference budget, and a per-view 4,096-visit guard bounds the new face and substitution scan; longer scans decline. These bounds do not cover parsing, existing inference, atom sizes or repeated attempts. One startup-inclusive, shared-load comparison of 100 valid and 100 invalid source definitions took 29.67 s wall / 25.14 s user CPU before this slice and 33.47 s / 26.99 s with it; the former declined all 200 while the latter inferred the valid definitions. These single runs are not a production benchmark. Two-arm matches over explicit source tags and flat binder or wildcard fields use that same one-layer view and existing binder, coverage and branch checks; a single-arm match on a direct in-scope wing can report its missing case. Recursive children retain their nominal type and arguments. Subject recognition and view validation can each scan substitutions, and the scan cap applies separately to each attempt. In one separate startup-inclusive comparison of 100 valid and 100 invalid source matches, the construction-only checker took 30.18 s wall / 29.31 s user CPU and declined all 200, while the pattern slice took 28.28 s / 27.69 s and inferred or diagnosed them. These single shared-load figures are not production benchmarks. General structural fits, catch-all and nested patterns, recursive source with imports and local recursive molds remain unsupported; the test tree does not prescribe the eventual `element` representation. Caller-supplied detached interfaces and caches retain the existing trusted-input contract.
98−
99−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.
100−
101−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.
102
70
103−Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura, core or proven union-overlap errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
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.
104
72
105−For supported source-aware Hoon `$?` unions, the reader can prove a definite overlap by independently evaluating and projecting the original cases, verifying each projected head against its source tag, and finding a shared runtime noun in a pair. Its positive witness traverses faces, named nodes, forks, cells, supported atom forms and `*`; `!!`, opaque references, applications and unproved aura intersections cannot themselves establish a witness. It compares singleton noun values independently of aura, and requires inhabited positions throughout a cell. Unknown or exhausted proof remains unsupported, while existing disjoint-source recovery still handles proven distinct cases. The source screen admits at most 128 cases and 4,096 raw noun nodes; dependency checking and the pair/type witness each have their own 4,096-node budget. Hoon evaluation, projected-graph validation, chapter lookup, atom byte sizes and other type-graph walks remain outside those budgets. The error points at the Jibb use; source case locations are unavailable. This is a partial named-reader analysis, not general imported-union checking or a mark-reader overlap diagnostic.
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.
106
74
107−In single startup-inclusive runs of eight Hoon reads, a benign three-case union used 37.78 seconds of user CPU with the earlier narrow witness and 39.99 seconds with the structural witness; a repeated-head union used 39.84 and 40.97 seconds. Other checks ran concurrently, so these measurements do not establish a production bound.
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.
108
76
109−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.
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.
110
78
111−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.
112−
113−`+api-path-evidence-source` retains that analysis with the API source, complete prepared prelude (including reserved names), supplied reader results and resolved Jibb dependency cache. `+api-path-watchability` classifies a unique declaration as watchable or not watchable, or reports unknown when evidence is absent or ambiguous. The artifact and reader results are trusted host inputs; the host must bind them to the source versions used later. This is declaration evidence, not proof about an arbitrary request value, a checked API module, a runtime validator or an island watch.
114−
115−For a unique supported declaration, `+api-request-parts` retains that evidence with the typed path parameters in source order, the full-state reply sample, and a fold type when there is one diff mark. The fold takes the tagged diff and previous full state and returns full state. Missing or ambiguous evidence, unsupported parameter auras and multiple-diff folds fail closed. These are components for a future request gate; they do not yet fix its argument order, construct a request, or prove watchability of a value.
116−
117−`+api-support-analysis-source` additionally infers supported ordinary API molds and values, resolves every declared mark, and retains their source, dependency and path evidence. Unsupported helpers or marks fail closed. An unused `/-` core is not independently validated, ordinary definitions that need derived gates remain unsupported, and this result is not a checked API interface or an exported request.
118−
119−The ordinary import resolver can infer derived request-gate types for multiple supported API paths. A case may take one typed path parameter before its reply gate, or one diff fold after the reply; a case with both, multiple parameters or diffs, or a separate scry path remains unsupported. Each reply maps the full mark type to a fresh `M` and the request result is `(ask M)`. Checked ordinary API values and molds, declared mark molds and a supported poke constructor are exported too. Every selected `/sur` core must have a directly used, successfully read mold; unselected core bindings are not independently validated, and Jibb module imports remain unsupported in this API fragment. The unchanged todo API fits this fragment.
120−
121−A call whose direct result is a known named generic union can receive a matching same-origin, same-arity result context before its arguments are inferred. This retains the ordered generic arguments and existing capital checks; pending tags, recursive or variable-bound origins and unrestricted atom cases remain conservative. Constructor fitting reports unsupported when an unresolved or opaque case could contain the requested tagged head. It keeps definite missing-case errors for proven nonmatching cases, including an explicitly atom-only faced head. The real todo callback `|=%got` can infer when an `(ask msg)` result context fixes its message union; the uncontextualized call remains unsupported.
122−
123−A two-item tuple with an explicit term, null or loobean head can receive payload context from a known union when every alternative is a literal-headed cell and its head noun is unique. The payload must be a direct wing-headed call, optionally grouped, with literal, wing or constructor arguments. The checker first retains the original inference if it already fits; otherwise it tries the contextual path once and fits the selected case and enclosing union. It declines this path if any substitution has a structural root, because a caller may have walked away variable provenance. Duplicate heads, opaque competitors and other shapes also stay conservative. The guard scans the substitution for each eligible tuple and may perform one extra shallow inference; it does not guarantee globally linear work. This lets an explicitly typed todo subscription body infer; it does not check an island or prove request watchability.
124−
125−`+gate-free-type` is a separate three-way proof over normalized checker types: it reports a gate-free result, a gate-bearing witness with its field path, or unknown. It tracks conservative inhabitance before reporting a gate in a cell, spends one shared node budget, and treats opaque recursion, open variables, unknown collection forms and `*` conservatively. Source-proven `qath` and the recognized list/unit representations have dedicated proofs. `+gate-free-mold-source` parses and resolves one named mold with a fresh active-root graph, retaining the complete prepared prelude, source bundle, trusted reader inputs, dependency cache and inferred mold. It caps classification at 256 nodes; parsing, import resolution and type inference are not covered by that cap. The host must canonicalize paths and bind trusted sources and reader results to their versions. API, store and private roots decline; other definitions and unused imported Hoon bindings are not fully checked. This is mold analysis, not a module, kind, island, watchability or runtime check, and it does not infer general gate-free constraints.
126−
127−Each case's canonical API identity and source-derived schema travel across imports in a nonrecursive graph certificate containing the exact source bundle, prelude, reserved scope and trusted reader results. Cached interfaces must match those inputs and cannot hide an active ancestor; unknown legacy entries are rebuilt from their unique supplied source. Request-bearing closures are limited to 256 paths and requests. Closed gate samples can also fit when an unnamed input slot corresponds to a named one, provided products are identical and nested value faces and ambiguous cell tails remain intact. This is type inference only: request lowering, runtime schema validation and value watchability proofs are not implemented.
128−
129−`+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.
130−
131−The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `lent`, `zing`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies private comparison and arithmetic schemes for the Jibb-written `gth`, `add` and `dec` wrappers. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. The Jibb-written `lth`, `gte` and `lte` gates compose the source-backed `gth` and `not` gates; supported calls infer a shared atom constraint and return `?`. Their execution and jet recognition await the backend. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. The partial checker resolves the supported `poke` source shape, preserves its public name, and rejects ordinary imports of the private internal path. The Jibb-written `lent` recursively counts a list using `add`; the partial checker infers its generic list argument and `@ud` result. Its execution and jet recognition remain unverified until the backend exists. The Jibb-written `zing` concatenates homogeneous lists in order using `weld`; the checker infers `(list (list A))` to `(list A)`, including for gate elements. Hoon `zing` also accepts heterogeneous noun lists, which this type does not express. `tools/hoon --raw -f tools/testdata/zing-hoon-reference.hoon` compares an equivalent Hoon recursion with Hoon `zing` on selected finite inputs; it does not execute Jibb or verify lowering or jet recognition. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, complete `ask` and `pure` checking, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
132−
133−`+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.
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.
134
80
135And the design notes:
81And the design notes:
136
82
@@ -141,26 +87,16 @@ And the design notes:
141| 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 |
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 |
142| 4. Printed formats | The token, tree and error formats the golden files hold |
88| 4. Printed formats | The token, tree and error formats the golden files hold |
143
89
144−Source-backed `like` maps the product of an existing `(like A)` result while retaining its position and remaining input. The partial checker infers supported positional calls by peeling only known sample-slot faces, retaining faces belonging to values; ambiguous variable-bound spines and nested face loss remain unsupported. Backend execution remains outstanding.
145−
146−The internal prelude defines transparent `(ask M)` cases for pure, agent and store requests; the public prelude re-exports it and defines `pure` in Jibb. Preparation supplies the private module with `list.core` and `unit.core` only from validated canonical public templates. If a template is unavailable, an isolated check validates the private molds, but only molds independently inferred against the actual available templates enter the interface. The partial checker infers supported constructors and exhaustive matches; absent versus present-zero state remains distinguishable. Agent and store receiver fields carry raw nouns and cannot prove schema validity or watchability. The public prelude also defines the documented `sub` union in Jibb; supported watch payloads retain the public `(ask M)` type. A `sub` value is not itself proof that its request is watchable. Generated decoders, source-bound runtime validation, request lowering, other derived request shapes and island watch checks remain unfinished. Public prelude preparation is partial: consumers must verify that `ask` was actually exported with its source origin.
147−
148−Public identity aliases of private generic unions retain their public name when the origin, arity and argument order match exactly, including through imported values. Fixed, reordered, repeated and phantom generic aliases remain unsupported where a safe public name cannot be recovered; a fixed nongeneric alias is not printed as though it accepted type arguments.
149−
150−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.
151−
152## The tree
90## The tree
153
91
154Every 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:
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:
155
93
156- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
94- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
157- **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.
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.
158−- **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.
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.
159- **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`.
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`.
160- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
98- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
161
99
162−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.
163−
164The 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.
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.
165
101
166## Positions and errors
102## Positions and errors
docs/development.md+3−65
@@ -60,37 +60,8 @@ git clone https://github.com/urbit/tools /root/src/tools
60| --- | --- |
60| --- | --- |
61| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
61| `tools/golden` | Runs the golden cases under `urbit eval`: every case, or those matching `--case`; `--update` rewrites the expected outputs; `--show` prints them |
62| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
62| `tools/importer-test` | Compares the partial Hoon importer's diagnostic trees and errors with `tests/importer/tree.txt` under `urbit eval` |
63−| `tools/type-import-default-test` | Compares default-wrapped union source proofs and adversarial cases under eval; the same golden runs on the ship |
64| `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 |
65−| `tools/type-import-overlap-test` | Checks source-aware Hoon union overlap, provenance and proof-budget controls under eval; the same fixture runs on the ship |
66−| `tools/type-import-structural-test` | Checks multi-case and nested Hoon union overlap witnesses under eval and on the ship |
67−| `tools/type-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
68−| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
69| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
64| `tools/type-mark-test` | Checks the partial checker’s mark import boundary against `tests/type-mark/expected.txt` under eval |
70−| `tools/type-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
71−| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
72−| `tools/type-api-evidence-test` | Runs source, scope, reader-result and declaration-watchability evidence guards under eval and on the ship |
73−| `tools/type-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
74−| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
75−| `tools/type-generic-recursion-test` | Checks source-backed generic recursive identity and provenance under eval and on the ship |
76−| `tools/type-generic-construction-test` | Checks source-backed one-layer recursive construction, provenance and fuel under eval and on the ship |
77−| `tools/type-generic-pattern-test` | Checks source-backed recursive patterns, coverage and fuel under eval and on the ship |
78−| `tools/type-generic-alias-test` | Runs public/private generic union alias and provenance guards under eval and on the ship |
79−| `tools/type-positional-face-guards-test` | Runs positional-call and nested-face guards under eval and on the ship |
80−| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
81−| `tools/type-todo-partial-test` | Reports partial inference of the unchanged todo island through the real API and readers under eval and on the ship |
82−| `tools/type-todo-api-test` | Exercises the actual todo API through the real Hoon readers and partial checker |
83−| `tools/type-direct-gate-test` | Checks a synthetic source-backed program report and direct gate provenance under eval and on the ship |
84−| `tools/type-closed-gate-guards-test` | Checks closed gate sample labels and face uncertainty under eval and on the ship |
85−| `tools/type-constructor-fit-guards-test` | Checks constructor-case uncertainty and known mismatches under eval and on the ship |
86−| `tools/type-nested-union-guards-test` | Checks nested tagged-union case selection and uncertainty under eval and on the ship |
87−| `tools/type-gate-free-guards-test` | Checks bounded gate-free verdicts, inhabitation and witness paths under eval and on the ship |
88−| `tools/type-gate-free-source-test` | Checks source-backed todo mold analysis through the real readers under eval and on the ship |
89−| `tools/type-sub-guards-test` | Checks source-backed subscription mold dependencies under eval and on the ship |
90−| `tools/type-ask-guards-test` | Runs ask origin and canonical list/unit bootstrap guards under eval and on the ship |
91−| `tools/type-request-guards-test` | Runs request evidence, source consistency and cache provenance guards under eval and on the ship |
92−| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
93−| `tools/type-arithmetic-guards-test` | Runs restricted atom-variable, unification and projection guards under eval and on the ship |
94| `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 |
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 |
95| `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 |
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 |
96| `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 |
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 |
@@ -98,7 +69,6 @@ git clone https://github.com/urbit/tools /root/src/tools
98| `tools/ship` | Runs the fake ship: `start`, `stop`, `status`, `log`, `sync <desk>`, `test`, `gen-tests`, `check-commit`, `scry`, `hoon`, `run`, `poke`, `commit`, `mount`, `unmount` |
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` |
99| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, and `tools/doc-blocks` against Markdown it writes |
70| `tools/testdata/selftest` | Tests `tools/golden` and `tools/hoon` against a stub library, and `tools/doc-blocks` against Markdown it writes |
100| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
71| `tools/testdata/ship-selftest` | Tests `tools/ship`'s test generator and runner against a stub library on the ship |
101−| `tools/testdata/clay-fixtures-selftest` | Tests temporary Clay fixture cleanup and signal handling without a ship |
102
72
103`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.
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.
104
74
@@ -107,52 +77,20 @@ git clone https://github.com/urbit/tools /root/src/tools
107```
77```
108tools/golden # all cases pass
78tools/golden # all cases pass
109tools/importer-test # Hoon importer fixture projections match
79tools/importer-test # Hoon importer fixture projections match
110−tools/type-import-default-test # default-wrapped source proofs match
111tools/type-import-test # importer/checker bridge golden report matches
80tools/type-import-test # importer/checker bridge golden report matches
112−tools/type-import-overlap-test # source-aware Hoon overlap and provenance controls
113−tools/type-import-structural-test # nested and multi-case Hoon overlap controls
114−tools/type-tlon-test # real Tlon importer/checker report matches
115−tools/type-import-diagnostic-test # direct structured reader diagnostics match
116tools/type-mark-test # mark/checker bridge golden report matches
81tools/type-mark-test # mark/checker bridge golden report matches
117−tools/type-poke-test # source-backed poke/API bridge report matches
118−tools/type-api-paths-test # partial API path analysis report matches
119−tools/type-api-evidence-test # API declaration evidence guards pass
120−tools/type-hole-guards-test # hole defaulting and API guards pass
121−tools/type-list-alias-test # prelude list-alias guards pass
122−tools/type-generic-alias-test # generic union alias guards pass
123−tools/type-positional-face-guards-test # positional sample face guards pass
124−tools/type-qath-guards-test # qath source and unfolding guards pass
125−tools/type-todo-partial-test # unchanged todo partial report and reader failure controls
126−tools/type-todo-api-test # real todo API partial inference and reader guards pass
127−tools/type-direct-gate-test # direct gate source and provenance guards pass
128−tools/type-generic-recursion-test # source-backed recursive identities and provenance
129−tools/type-generic-construction-test # source-backed recursive construction and bounds
130−tools/type-generic-pattern-test # source-backed recursive patterns and bounds
131−tools/type-closed-gate-guards-test # closed gate fit guards pass
132−tools/type-constructor-fit-guards-test # constructor fit guards pass
133−tools/type-nested-union-guards-test # nested union selector guards pass
134−tools/type-gate-free-guards-test # bounded gate-free classifier guards pass
135−tools/type-gate-free-source-test # real todo mold analysis and source guards pass
136−tools/type-sub-guards-test # subscription source guards pass
137−tools/type-ask-guards-test # ask source and bootstrap guards pass
138−tools/type-request-guards-test # request evidence and cache guards pass
139−tools/type-proj-guards-test # projection evidence and scope guards pass
140−tools/type-arithmetic-guards-test # arithmetic constraint guards pass
141tools/type-module-scope-test # module/prelude scope golden report matches
82tools/type-module-scope-test # module/prelude scope golden report matches
142tools/hoon check-spans-test # prints <<>>
83tools/hoon check-spans-test # prints <<>>
143−tools/hoon itype-unify-test # type-unification controls pass
144−tools/hoon -f tools/testdata/zing-hoon-reference.hoon # Hoon translation agrees on four inputs
145tools/testdata/selftest # 22 checks, 0 failed
84tools/testdata/selftest # 22 checks, 0 failed
146tools/doc-blocks docs/spec # every jibb block has its case
85tools/doc-blocks docs/spec # every jibb block has its case
147tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
86tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
148tools/ship test # the cases pass as -test arms on the ship
87tools/ship test # the cases pass as -test arms on the ship
149tools/testdata/ship-selftest # when tools/ship changed
88tools/testdata/ship-selftest # when tools/ship changed
150−tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
151tools/ship check-commit # when the mark or the desks changed
89tools/ship check-commit # when the mark or the desks changed
152−tools/clay-fixtures # builds example fixtures and real Tlon notes through Clay
90+tools/clay-fixtures # when the my-app Hoon fixtures or importer changed
153```
91```
154
92
155−`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.
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.
156
94
157## Golden cases
95## Golden cases
158
96
@@ -166,7 +104,7 @@ A case is a folder `tests/golden/<name>/` holding:
166- 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.
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.
167- 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.
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.
168
106
169−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.
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.
170
108
171A 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.
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.
172
110
docs/open-questions.md+7−29
@@ -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. Question 3 remains open; the field-order detail in question 32 is being clarified. 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, 20, 21, 22 and 23 remain open; 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 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.
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.
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.
@@ -37,34 +37,12 @@ Found while writing [prompts/milestone-2.md](prompts/milestone-2.md), checking i
3715. **Settled: unrestricted atoms and shared auras.** On 2026-10-30, @iko said `@` means any atom, independently at each occurrence, so Hoon `dime` and `pint` keep their bare-`@` fields. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Shared atom types use one capital, with the atom constraint inferred from its body, as for `add` taking `[A A]` and returning `A`.
3715. **Settled: unrestricted atoms and shared auras.** On 2026-10-30, @iko said `@` means any atom, independently at each occurrence, so Hoon `dime` and `pint` keep their bare-`@` fields. A specific atom such as `@ud` fits where `@` is expected; an `@` value needs a check to fit `@ud`. Shared atom types use one capital, with the atom constraint inferred from its body, as for `add` taking `[A A]` and returning `A`.
3816. **Settled: loobeans in union disjointness.** On 2026-10-30, @iko said `?` counts as its two atoms, `%.y` and `%.n`: it is disjoint from any cell and overlaps the constants 0 and 1.
3816. **Settled: loobeans in union disjointness.** On 2026-10-30, @iko said `?` counts as its two atoms, `%.y` and `%.n`: it is disjoint from any cell and overlaps the constants 0 and 1.
3917. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
3917. **Settled: empty cases in union disjointness.** On 2026-10-30, @iko said `!!` is disjoint from every case. A cell containing an empty position at any depth is itself empty and is also disjoint from every case.
40−18. **Settled: the value gate `like`.** On 2026-10-31, @iko chose a gate `(like convert result)` that maps the product of an existing `(like A)` result with `convert=$-(A B)`, yielding `(like B)` while preserving its position and remaining input. An absent result stays absent. The `(like A)` mold remains available in the separate mold namespace. Hoon's wet `+like` instead builds a gate that constructs a result from an input noun; the chosen Jibb value gate is an adaptation of that behavior.
40+18. **The two uses of Hoon `like`.** Hoon `+like` is a wet mold builder, but the gate it returns is callable and applies its supplied gate to the product. In a verified Hoon 135 example, applying `(like f)` to `[[1 2] [7 8 ~]]` produces an edge whose product is `8` when `f` is identity and `42` when `f` returns `42`; the resulting nail is the original input. Jibb molds are types, not callable values. The prelude now declares a generic `(like A)` mold and a `wonk` extractor; both parse, but their full type and backend validation remain outstanding. Should it also expose a value gate under `like`? If so, should the value preserve Hoon's input shape and behavior, or instead map the product of an already constructed edge? @iko is reviewing these alternatives; the exact public signature is not yet decided.
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. **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.
42+20. **The type of Hoon `clap`.** Hoon allows its two input units and combining gate's result to have different types. If only one unit is present it returns that unit; when both are present it returns the combining gate's result. Jibb branches normally need a common type, while every union written in Jibb has a name. Should the Jibb gate require a shared type, infer an unnamed union of the possible values, or wait for a different typing design? Asked @iko on 2026-10-30. `clap` is not implemented while this is open.
43−21. **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.
43+21. **Duplicate faces in imported Hoon records.** Hoon permits `[a=@ud a=@t]`, and its lookup picks the first `a`. Should Jibb reject the imported type where it is used, use the first field, or permit the type but reject access to the ambiguous field? Asked @iko on 2026-10-30. The inference fragment currently permits the type but declines ambiguous field access (doc question).
44−22. **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.
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.
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.
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).
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. **Settled: watching a request with unknown provenance.** On 2026-10-31, @iko said an island may watch a request only if the checker proves it watchable at compile time. An unknown request, including one built or passed through a gate without sufficient evidence, is rejected rather than deferred to a runtime check.
66−
67−34. **Settled: constructors and equal noun literals.** On 2026-10-31, @iko said expressions with the same runtime representation count as equal, and cases that cannot be distinguished at runtime are rejected at compile time. Thus `|=%$` matches a case headed by `%$`, `%.y` or `~`: each is the noun 0. Cases with equal heads and overlapping payloads cannot coexist in a union.
68
46
69## Grammar questions never put to the doc's author
47## Grammar questions never put to the doc's author
70
48
docs/prelude-inventory.md+9−17
@@ -4,18 +4,12 @@ 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. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
8−
9−The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The public prelude also declares `sub`; the partial checker infers supported constructions, while request watchability and execution remain outstanding.
10−
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.
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.
12
8
13## 1a
9## 1a
14
10
15`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
11`add`, `dec`, `div`, `dvr`, `gte`, `gth`, `lte`, `lth`, `max`, `min`, `mod`, `mul`, `sub`.
16
12
17−The source-backed `gth` gate calls a compiler-supplied private comparison interface. The partial checker accepts supported equal-aura atom arguments, including loobeans, and returns `?`; lowering, jet recognition and execution remain unfinished. The public `add` and `dec` gates are written in Jibb over private primitive interfaces. The partial checker infers a shared atom type that excludes loobeans, including through supported generic calls. The Jibb-written `lth`, `gte` and `lte` gates compose `gth` and `not`; supported calls infer a shared atom constraint and return `?`. Primitive execution and jet recognition remain unfinished.
18−
19## 1c
13## 1c
20
14
21`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
15`bite` (mold), `bloq` (mold), `each`, `gate` (mold), `list`, `lone`, `lest`, `mold` (mold), `pair`, `pole`, `qual`, `quip`, `step`, `trap`, `tree`, `trel`, `unit`.
@@ -26,30 +20,30 @@ The source-backed `gth` gate calls a compiler-supplied private comparison interf
26
20
27`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
21`biff`, `bind`, `bond`, `both`, `clap`, `clef`, `drop`, `fall`, `flit`, `hunt`, `lift`, `mate`, `need`, `some`.
28
22
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. `zing` concatenates homogeneous lists in order; Hoon’s raw `zing` can also flatten heterogeneous noun lists, which this Jibb type does not express. A Hoon translation agrees with Hoon `zing` on selected finite inputs; this is not Jibb execution. Backend validation and jet recognition remain outstanding for all of them.
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.
30
24
31| Name | Hoon behavior | Jibb status |
25| Name | Hoon behavior | Jibb status |
32| --- | --- | --- |
26| --- | --- | --- |
33| `biff` | Applies a gate returning a unit to a present value; absent stays absent. | Written |
27| `biff` | Applies a gate returning a unit to a present value; absent stays absent. | Written |
34| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
28| `bind` | Applies a gate to a present value and wraps the result; absent stays absent. | Written |
35−| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Written and inferred as a curried gate; backend validation remains outstanding |
29+| `bond` | Calls a fallback trap for an absent unit, otherwise returns its value. | Missing |
36| `both` | Returns a unit of both values when both units are present. | Written |
30| `both` | Returns a unit of both values when both units are present. | Written |
37−| `clap` | Returns the present unit if only one is present; combines both values with a gate if both are present. | Written with one shared type for both units and the combining gate, as @iko chose |
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 |
38| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Written |
32| `clef` | Applies a gate returning a unit when both inputs are present; otherwise returns an absent unit. | Written |
39−| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written; inferred by the partial checker |
33+| `drop` | Converts an absent unit to an empty list and a present unit to a singleton. | Written |
40−| `fall` | Returns the value of a present unit or the supplied fallback. | Written; inferred by the partial checker |
34+| `fall` | Returns the value of a present unit or the supplied fallback. | Written |
41| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
35| `flit` | Returns a gate that wraps a value only if it satisfies the predicate. | Written |
42| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
36| `hunt` | Returns the only present unit or chooses between two present values with an ordering gate. | Missing |
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 |
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 |
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 |
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 |
45−| `need` | Extracts a present value and crashes on an absent unit. | Written; inferred by the partial checker |
39+| `need` | Extracts a present value and crashes on an absent unit. | Written |
46| `some` | Wraps a value in a present unit. | Written |
40| `some` | Wraps a value in a present unit. | Written |
47
41
48## 2b
42## 2b
49
43
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`.
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`.
51
45
52−The current prelude writes `snoc`, `lure`, `flop`, `join`, `lent`, `zing`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `lent` counts items by recursion and `add`; `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. The partial checker infers `snoc`, `lure`, `weld`, `turn`, `flop`, `rear`, `skim`, `skip`, `murn`, `join`, `snip`, `lent`, `zing`, `levy` and `lien` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` state their existing result types without changing their bodies. Backend validation remains outstanding for all of them.
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.
53
47
54## 2c
48## 2c
55
49
@@ -99,8 +93,6 @@ The current prelude writes `snoc`, `lure`, `flop`, `join`, `lent`, `zing`, `levy
99
93
100`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
94`aftr`, `cork`, `corl`, `cury`, `curr`, `fore`, `head`, `same`, `succ`, `tail`, `test`, `lead`, `late`.
101
95
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−
104## 2o
96## 2o
105
97
106`jar`, `jug`, `map`, `qeu`, `set`.
98`jar`, `jug`, `map`, `qeu`, `set`.
@@ -123,7 +115,7 @@ Hoon 135's `3g` section has exactly 12 exports: ten `+$` molds (`coin`, `dime`,
123| `dime` | `[p=@ta q=@]` in Hoon. The `q` field accepts any atom, as does Jibb `@` after @iko's decision in question 15. |
115| `dime` | `[p=@ta q=@]` in Hoon. The `q` field accepts any atom, as does Jibb `@` after @iko's decision in question 15. |
124| `edge` | `[p=hair q=(unit [p=* q=nail])]`: a parsing position and either no result or a result and remaining input. |
116| `edge` | `[p=hair q=(unit [p=* q=nail])]`: a parsing position and either no result or a result and remaining input. |
125| `hair` | `[p=@ud q=@ud]`: a parsing position. |
117| `hair` | `[p=@ud q=@ud]`: a parsing position. |
126−| `like` | A wet mold builder parameterized by a gate `a=$-(* *)`; its generated gate takes a noun, builds an `edge`-shaped result, and applies `a` to the product on success. The prelude declares the generic mold `+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]`. The Jibb value gate maps the product of an existing result and preserves its position and remaining input; the partial checker infers supported calls, while backend validation remains outstanding. |
118+| `like` | A wet mold builder parameterized by a gate `a=$-(* *)`; its generated gate takes a noun, builds an `edge`-shaped result, and applies `a` to the product on success. The prelude declares the generic mold `+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]`. A callable Jibb value form remains open in question 18. |
127| `nail` | `[p=hair q=tape]`: parsing input. |
119| `nail` | `[p=hair q=tape]`: parsing input. |
128| `pint` | `[p=[p=@ q=@] q=[p=@ q=@]]` in Hoon. The four positions accept atoms independently; Jibb `@` now has the same meaning. |
120| `pint` | `[p=[p=@ q=@] q=[p=@ q=@]]` in Hoon. The four positions accept atoms independently; Jibb `@` now has the same meaning. |
129| `rule` | A gate mold `$-(nail edge)`; Hoon constructs its sample and product from the `nail` and `edge` molds. |
121| `rule` | A gate mold `$-(nail edge)`; Hoon constructs its sample and product from the `nail` and `edge` molds. |
@@ -152,7 +144,7 @@ The following shapes can be written as Jibb declarations once their referenced p
152 [%2 p=(list tank)]
144 [%2 p=(list tank)]
153```
145```
154
146
155−The compiler-result `tone.hoon` has the three cases listed above; the qualified name is a prelude group member, not a `+$` identifier containing a dot. Question 15 in [open-questions.md](open-questions.md) records @iko's decision that `@` is an unrestricted atom, resolving the `dime` and `pint` mismatch. The source-backed value form of `like` maps an existing result's product. Supported calls infer in the partial checker; complete checking and backend validation for `like` and `wonk` remain outstanding.
147+The compiler-result `tone.hoon` has the three cases listed above; the qualified name is a prelude group member, not a `+$` identifier containing a dot. Question 15 in [open-questions.md](open-questions.md) records @iko's decision that `@` is an unrestricted atom, resolving the `dime` and `pint` mismatch. The callable value form of `like` remains unresolved. The new `like` mold and `wonk` gate parse, but full type and backend validation remain outstanding.
156
148
157## 4a
149## 4a
158
150
docs/prompts/milestone-2.md+9−11
@@ -49,7 +49,7 @@ And from the plan's Risks:
49
49
50## First steps
50## First steps
51
51
52−1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives. The source-backed internal module defines `poke`, `ask` and `qath`; the public prelude re-exports them as ordinary transparent types that modules can construct and inspect, as questions 24 and 25 record. Their current representations and partial checker support are described in `docs/compiler.md`.
52+1. **Specify the prelude inventory.** The checker needs the prelude's complete exported inventory and signatures; include all names from the listed Hoon library sections except explicitly excluded groups, as `docs/open-questions.md` question 3 records. The prelude imports private helpers and low-level primitives from a separate internal module without exposing them; its public foundational gates are implemented in Jibb on those primitives.
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,23 +59,21 @@ 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. Explicit `proj` is a type-directed operation.
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.
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`.
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.
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.
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.
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.
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`.
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`.
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".
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".
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 ~)`.
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 ~)`.
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]`.
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]`.
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.
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.
72−- `_` is an inferable hole wherever a mold can appear, including an inferred path-segment aura. A hole resolved to an explicitly named generic variable is resolved; an unconstrained hole is an error. A named mold or value definition must determine its own holes without constraints from later uses.
73−- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests; application-path literals have type `qath`.
71+- `poke`, `ask` and `qath` are opaque, built only by derived gates, `pure` and application-path literals.
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`.
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`.
75
73
76**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
74**Tags, `~`, numbers and cells wait for their context** (Grammar: Tag resolution, Literals by context)
77- A tag or `~` gets a fresh variable and a pending constraint, checked once unification fixes the variable: against a union's cases, by shape and shared tag positions, or as a constant atom for `@tas`, `@ta`, `@` or `*`. A literal that matches nothing is "an error naming the union, such as "msg has no case %submitt"".
75- A tag or `~` gets a fresh variable and a pending constraint, checked once unification fixes the variable: against a union's cases, by shape and shared tag positions, or as a constant atom for `@tas`, `@ta`, `@` or `*`. A literal that matches nothing is "an error naming the union, such as "msg has no case %submitt"".
78−- `|=%typed` is a case's constructor: "against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. A literal case head matches by noun value, so `|=%$` also matches `%.y` and `~` heads; a bare tag is always a value."
76+- `|=%typed` is a case's constructor: "against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases tagged at their head; a bare tag is always a value."
79- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages. A tag constraint still open when the module is checked is an error asking for a `^-`; the checker never guesses. Gate-free constraints are retained when generalized.
77- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages. A tag constraint still open when the module is checked is an error asking for a `^-`; the checker never guesses. Gate-free constraints are retained when generalized.
80- "Wing access, changes and `?-` on a type not yet known wait the same way." A change with no items, `m()`, is an error; the parser still accepts it. Patterns don't wait: they're checked against the subject's type.
78- "Wing access, changes and `?-` on a type not yet known wait the same way." A change with no items, `m()`, is an error; the parser still accepts it. Patterns don't wait: they're checked against the subject's type.
81- Number and cell literals each "takes a default when its `++` is checked": a number `@ud`, a cell a tuple. But "A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it", so `++ inc |= n=A (add n 1)` stays generic: unlike a tag's, a number's variable doesn't stop its `++` from generalizing. A cell can also become a record or, where a list is expected, a cons.
79- Number and cell literals each "takes a default when its `++` is checked": a number `@ud`, a cell a tuple. But "A number takes `@ud` only if nothing fixes its aura and its `++` isn't generic over it", so `++ inc |= n=A (add n 1)` stays generic: unlike a tag's, a number's variable doesn't stop its `++` from generalizing. A cell can also become a record or, where a list is expected, a cons.
@@ -100,7 +98,7 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
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.
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.
101
99
102**Importing Hoon types** (overview: Importing Hoon types; Decisions: Hoon types)
100**Importing Hoon types** (overview: Importing Hoon types; Decisions: Hoon types)
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.
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.
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.
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.
105
103
106**Islands, pages and stores** (overview: The Elm architecture on Urbit; Grammar: Modules and the store example)
104**Islands, pages and stores** (overview: The Elm architecture on Urbit; Grammar: Modules and the store example)
@@ -109,19 +107,19 @@ The rules are scattered across the tabs. This is a map of them, not a replacemen
109- "Island data and models can't hold gates; the checker names the field."
107- "Island data and models can't hold gates; the checker names the field."
110
108
111**API files, stores and derived gates** (overview: Agent APIs, Effects; Grammar: Modules)
109**API files, stores and derived gates** (overview: Agent APIs, Effects; Grammar: Modules)
112−- `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths`; "`poke` and `paths` are declarations, not molds." "A path case is a request name, a path and a type", and "A case can name another scry path, as in `[%changes /updates (facts todos todo-update) scry=/todos]`, used only by pages." An island may watch a request only when the checker proves it is watchable; a separate `scry=` path or unknown watchability is a type error.
110+- `/ui/api/<agent>.jibb` declares `+$ poke` and `+$ paths`; "`poke` and `paths` are declarations, not molds." "A path case is a request name, a path and a type", and "A case can name another scry path, as in `[%changes /updates (facts todos todo-update) scry=/todos]`, used only by pages." An island watching a request whose case has `scry=` has a type error.
113- Each poke type gives a constructor, as `todo-action.todo`, and each path case a request, as `(todos.todo |=%got)`. A path with typed segments takes them too: the overview's `(post.api slug same)` suggests they come first. A `(facts full diff …)` case's request also takes a fold, as `$-([[%todo-update todo-update] todos] todos)`.
111- Each poke type gives a constructor, as `todo-action.todo`, and each path case a request, as `(todos.todo |=%got)`. A path with typed segments takes them too: the overview's `(post.api slug same)` suggests they come first. A `(facts full diff …)` case's request also takes a fold, as `$-([[%todo-update todo-update] todos] todos)`.
114- A store's `+$ poke` is a declaration, not a mold. A store exports a constructor per poke type and a `state` request. Clashing derived names are errors, including clashes with an import face. The checker must account for the fact that the type of `main` determines whether a module is a store.
112- A store's `+$ poke` is a declaration, not a mold. A store exports a constructor per poke type and a `state` request. Clashing derived names are errors, including clashes with an import face. The checker must account for the fact that the type of `main` determines whether a module is a store.
115
113
116**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
114**The prelude** (overview: Prelude, Layout and styling, Links and URLs, Effects)
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.
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.
118−- Signatures change where the Prelude table says: `clap` takes two units of one value type and a combining gate over that type; the value gate `(like convert result)` maps the product of a `(like A)` to a `(like B)`, preserving position and remaining input; maps and sets are plain gates over Hoon's trees, as `(get.by m k)`; folds take a start, as `(roll xs init f)`, `rep.by` and `rep.in`; ordered maps go through lull's `on`, as `(get.on lte m k)`.
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)`.
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".
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".
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.
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.
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."
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."
122
120
123**Errors**
121**Errors**
124−- Each one the Grammar tab describes needs a golden case with its message. A start on the list: an aura mismatch; mismatched faces; "msg has no case %submitt"; an unresolved tag, as the Grammar's `add-button` ("nothing fixes the union of %add"); an open constraint at the end of a module; a `|=%tag` whose union has no case with an equal literal head; a union whose cases overlap; a missing `?-` case, named; an arm that earlier arms cover; a value that refers to itself; a shadowed name, including a prelude or imported one; a cell in `{…}` with no printer; an atom of a generic aura in `{…}` or a path's `(…)`; a capital that a body makes a `@ud` or a list; `~[text "hi"]`, where the checker suggests `~[(text "hi")]`; clashing derived names; an import cycle; from an import, a signed or float aura, a core, gate or vase, or a `$%`, `$?` or `$^` whose cases don't differ as nouns, or a record with duplicate field names, each where used; a `(facts …)` outside an API file's `paths`; a gate in island data or a model, naming the field; a repeated attribute in a literal list. Read the Grammar tab, and the other tabs' mentions of "error" and "the checker", and make the list complete.
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.
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.
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.
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.
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.
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.
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.
docs/spec/core-language.md+1−2
@@ -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,7 +82,6 @@ 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 |
86| `card.card`, an import | The qualified name `components/card:card` |
85| `card.card`, an import | The qualified name `components/card:card` |
87| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)` |
86| `m(draft=t error=~)` | One `edit` per item, in order: `(edit 7 (edit 6 m t) ~)` |
88| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
87| `f a b c` | `(app f (cons a (cons b c)))`: the arguments are the sample |
docs/spec/decisions.md+8−14
@@ -24,29 +24,25 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
24| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 |
24| Several open brackets | The deeper lines go to the last bracket, or the last rune's body, left open on a line, and the brackets before it close with it: `(column ~ ~[` needs no `)` | Decided 2026-10-30 |
25| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 |
25| Jibb code blocks | Labelled `jibb` in this doc; each is a golden test | Decided 2026-10-30 |
26| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
26| Definitions | `++` for values, `+$` for molds; no `=/` | Decided |
27−| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; constructor heads and case disjointness compare literal noun values regardless of spelling, so `%$`, `%.y` and `~` are equal and overlapping cases are errors; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-31 |
27+| Unions | No `$?`: a `+$` with its cases on the lines below is a union, so every union written in Jibb has a name; one case is just that mold; a mold that isn't a union counts as a union of one case for tags and `\|=%tag`; a generic's `\|$` comes right after the `+$`'s name; tags anywhere; cases differ as nouns, with `?` treated as the two atoms `%.y` and `%.n`, disjoint from cells and overlapping constants 0 and 1, and `!!` or any cell with an empty position disjoint from every case; a tag literal or `~` waits for its union, and an unresolved one is an error | Decided 2026-10-30 |
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`, 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 |
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 |
30| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
30| Branching | `?-` only, loobeans included; exhaustive, with explicit catch-alls; covered arms are errors; failures say `!!` | Decided 2026-10-29 |
31| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 |
31| Equality and negation | The gates `eq` and `not`, with Hoon's bitwise `not` exposed as `not.bit`; `eq`'s arguments and map and set keys contain no gates, even nested; the checker infers and generalizes that constraint; union matching never inspects a gate to distinguish cases | Decided 2026-10-30 |
32| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
32| Special rules | No built-ins; type-directed rules are welcome, each listed in the Grammar tab | Decided 2026-10-29 |
33| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a number takes `@ud` only where its `++` isn't generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; principal types | Decided 2026-10-30 |
33| Inference | Hindley–Milner with aura variables; `@` is any atom, a specific atom fits `@` and a more specific aura fits an ancestor in its Hoon aura family, but each reverse needs a check, and repeated atom-constrained capitals give the same type; a number takes `@ud` only where its `++` isn't generic over its aura; distinct specific auras remain distinct; faces are part of record types, and an unnamed position can take a face but two different faces don't unify; principal types | Decided 2026-10-30 |
34−| Effects | The library unions `cmd` and `sub`; `poke`, `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 |
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 |
35−| Poke representation | The source-backed private internal prelude module defines `poke`, and the public prelude re-exports it as an ordinary transparent type. Ordinary modules can construct and inspect its values | Decided 2026-10-31 |
36−| Agent APIs | `/ui/api/<agent>.jibb` with `+$ poke` and `+$ paths`, over the agent's mark types; a case is a name, a path and a type, with `(facts full diff …)` for diffs, told apart by mark; an optional scry path, for pages; an island may watch a request only when the checker proves it is watchable, so a separate scry path or unknown watchability is an error; typed segments by aura | Decided 2026-10-31 |
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 |
37| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
36| Mark names | Any name: `/%` names types after marks, and constructors poke with their type's mark; no alias marks | Decided 2026-10-26 |
38| Derived gates | API files and stores give a constructor per poke type and a checked request per path or store state; clashing names are errors, including a derived name that clashes with an import face | Decided 2026-10-30 |
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 |
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 |
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 |
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 |
42| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
39| Layout | Indentation; juxtaposed calls; a bracket open at line end takes one item per line, with no closer | Decided |
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 |
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 |
44| Long calls | One argument per line inside parentheses | Decided |
41| Long calls | One argument per line inside parentheses | Decided |
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 |
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 |
46| Empty mold | `!!`, with no values; the expression has any type; pages are `(element !!)`, which keeps islands out of islands | 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 |
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 |
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 |
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 |
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 |
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 |
50| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
46| Loobean mold | `?`, switched with `?-` | Decided 2026-10-26 |
51| Defaults | None | Decided |
47| Defaults | None | Decided |
52| Modules | Records, not cores | Decided |
48| Modules | Records, not cores | Decided |
@@ -55,7 +51,6 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
55| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
51| Binding patterns | In `?-` arms; the last position binds the rest | Decided 2026-10-29 |
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 |
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 |
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 |
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 |
58−| Loobean arithmetic | Arithmetic rejects loobean operands; comparison may accept them and returns `?` | Decided 2026-10-31 |
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 |
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 |
60| Refinement types | None | Decided |
55| Refinement types | None | Decided |
61| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
56| Imports | `/-`, `/%` (a mark's type, with no face) and `/=`; no `/+`; cycles are errors | Decided 2026-10-29 |
@@ -72,7 +67,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
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 |
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 |
73| Transactions | None; one poke per command | Decided |
68| Transactions | None; one poke per command | Decided |
74| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
69| Reloads | Restart from the model the page is served with | Decided 2026-10-29 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
@@ -81,8 +76,7 @@ The choices behind the Language tab, made on 2026-10-23; a later date marks a re
81| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
76| Dark mode | Hand-written dark tones under `dark`, used when the reader prefers dark | Decided 2026-10-27 |
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 |
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 |
83| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
78| Data layer | Hoon's nouns: units, treaps, loobeans | Decided |
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 |
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 |
85−| `like` | The `(like A)` mold remains available; the value gate `like` maps the product of an existing `(like A)` with a gate `$-(A B)`, preserving the position and remaining input, and returns `(like B)` | Decided 2026-10-31 |
86| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
80| Wire format | Noun channels; Jibb's own noun codec in the browser | Decided 2026-10-29 |
87| Hosting | One thin host agent on `%jibb` binds, caches and serves every Jibb desk; each desk vendors jibb-dev, names its base path in docket's `site+`, and builds and renders with its own copy through fixed entry points; install `%jibb` first; app agents stay plain Hoon; pokes only from the ship | Decided 2026-10-29 |
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 |
88| Private pages | Served by the host per request and never cached; non-owners go to the login page | 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 |
docs/spec/grammar.md+14−16
@@ -91,7 +91,7 @@ Imports come first:
91/= card /ui/components/card :: a Jibb module
91/= card /ui/components/card :: a Jibb module
92```
92```
93
93
94−An imported Hoon record with duplicate field names is an error where used; imported union cases must differ as nouns. `/%` names a type after its mark, so it takes no face, and any mark name works; Hoon's `/%` binds the mark's core instead. Derived constructors such as `todo-action.todo` supply the agent and mark, so callers need not write those details. API modules re-export their `/%` types, not `/-` faces or `/=` modules. Import cycles are errors.
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.
95
95
96## Modules
96## Modules
97
97
@@ -102,7 +102,7 @@ A file is a module: imports, then definitions.
102- Molds and values have separate namespaces, told apart by position: `todo-action.todo` is a mold and its constructor, `todos.todo` a mold and a request.
102- Molds and values have separate namespaces, told apart by position: `todo-action.todo` is a mold and its constructor, `todos.todo` a mold and a request.
103- `main`'s type decides the kind: `(element !!)` a page; `(page R D)` a page with data, from parameters `R` to data `D`; `(program D X M)` an island, with data, model and messages; `(store S)` a store with state `S`. They're built by `(page load view)`, `(program init update view subs)` and `(store init update)`. A module without `main` is a library.
103- `main`'s type decides the kind: `(element !!)` a page; `(page R D)` a page with data, from parameters `R` to data `D`; `(program D X M)` an island, with data, model and messages; `(store S)` a store with state `S`. They're built by `(page load view)`, `(program init update view subs)` and `(store init update)`. A module without `main` is a library.
104- Everything is exported and read through the import's face, as `card.card`. The prelude keeps private helpers in a separate internal module; it imports them without exposing them.
104- Everything is exported and read through the import's face, as `card.card`. The prelude keeps private helpers in a separate internal module; it imports them without exposing them.
105−- An API module, `/ui/api/<agent>.jibb`, also exports derived gates: a constructor per `poke` type, adding the agent and mark, and a request per `paths` case, taking a reply over full state, plus a fold for `(facts full diff …)`. An island may watch a request only when the checker proves it is watchable. A request whose case has a separate `scry=` path, or whose watchability cannot be proved, is a type error. A store's `+$ poke` is a declaration, not a mold; a store exports a constructor per `poke` type and a `state` request. Clashing derived names are errors, including a derived name that clashes with an import face.
105+- An API module, `/ui/api/<agent>.jibb`, also exports derived gates: a constructor per `poke` type, adding the agent and mark, and a request per `paths` case, taking a reply over full state, plus a fold for `(facts full diff …)`. An island that watches a request whose case has a separate `scry=` path has a type error. A store's `+$ poke` is a declaration, not a mold; a store exports a constructor per `poke` type and a `state` request. Clashing derived names are errors, including a derived name that clashes with an import face.
106
106
107Names the host reads, by file:
107Names the host reads, by file:
108
108
@@ -118,30 +118,28 @@ 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. Records can also be projected explicitly, as described below.
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.
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.
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 `?`.
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.
125- **Constants**: `%add`, `~` and the loobeans have one value each.
124- **Constants**: `%add`, `~` and the loobeans have one value each.
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.
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.
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.
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.
128- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
127- **Containers**: `(list A)`, `(unit A)`, `(set A)`, `(map K V)`, `(mop K V)`, `(qeu A)`, `(jar K V)`, `(jug K V)`.
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.
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.
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.
129+- **Paths**: `/todos` is constant, `/` empty, and `/todo/[id=@ud]` typed by aura. `%/blog/(slug)` is an `qath`, checked against routes and static files.
131- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
130- **Generic molds**: `+$ result |$ [V E]` with cases below; `|$` goes only right after a `+$`'s name.
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**: `!!`.
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**: `!!`.
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`.
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`.
135- **Identity**: recursive molds go by name and module.
133- **Identity**: recursive molds go by name and module.
136
134
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.
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.
138
136
139## Tag resolution
137## Tag resolution
140
138
141A tag literal or `~` gets a fresh type variable and a pending constraint: the variable must become a union with a matching case, or an atom type the term fits. A mold that isn't a union counts as a union of one case, for tags and for `|=%tag`: `[%go "x"]` fits `+$ go [%go url=@t]`, and `|=%typed` works against `$-(@t M)` when `M` is `[%typed text=@t]`. Once unification fixes the variable, each constraint is checked against the union's cases or, for `@tas`, `@ta`, `@` or `*`, makes the tag that constant atom. A literal that matches nothing is an error naming the union, such as "msg has no case %submitt".
139A tag literal or `~` gets a fresh type variable and a pending constraint: the variable must become a union with a matching case, or an atom type the term fits. A mold that isn't a union counts as a union of one case, for tags and for `|=%tag`: `[%go "x"]` fits `+$ go [%go url=@t]`, and `|=%typed` works against `$-(@t M)` when `M` is `[%typed text=@t]`. Once unification fixes the variable, each constraint is checked against the union's cases or, for `@tas`, `@ta`, `@` or `*`, makes the tag that constant atom. A literal that matches nothing is an error naming the union, such as "msg has no case %submitt".
142
140
143- A constraint records the literal's shape, such as `[@t %draft]`, and matches cases by shape and shared tag positions; a literal in a field position is checked against that field.
141- A constraint records the literal's shape, such as `[@t %draft]`, and matches cases by shape and shared tag positions; a literal in a field position is checked against that field.
144−- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases whose head is a literal with the same noun as the tag, regardless of how that literal is written: `|=%$` also constructs a case headed by `%.y` or `~`, since each is the noun 0. A bare tag is always a value.
142+- `|=%typed` is a case's constructor: against `$-(@t M)` it is `|=(t [%typed t])`, requiring `M` to have a case `[%typed @t]`. It works for cases tagged at their head; a bare tag is always a value.
145- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
143- A variable constrained by tag resolution, and any it mentions, doesn't generalize; it stays open until something in the module fixes it. An island's `main` fixes its messages, so islands resolve their own tags. The inferred gate-free constraint is retained when a type variable is generalized.
146- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
144- A constraint still open when its module is checked is an error asking for a `^-`; the checker never guesses. Library helpers can cast, as in `^- (list attr)`.
147- Wing access, changes and `?-` on a type not yet known wait the same way.
145- Wing access, changes and `?-` on a type not yet known wait the same way.
@@ -212,7 +210,7 @@ Tags can sit anywhere in a case, and a case can carry several:
212 [%move %left n] "left {n}"
210 [%move %left n] "left {n}"
213 [%move %right n] "right {n}"
211 [%move %right n] "right {n}"
214 [t %draft] t
212 [t %draft] t
215− [t %sent sent-at] t
213+ [t %sent at] t
216 %stop "stop"
214 %stop "stop"
217```
215```
218
216
@@ -262,7 +260,7 @@ rune = "|=" field ( expr | body )
262 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
260 | "?-" expr INDENT arm { NEWLINE arm } DEDENT ;
263arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
261arm = pattern ( expr | body ) ; (* every case covered; see Patterns *)
264
262
265−mold = aura | "_" | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
263+mold = aura | "*" | "!!" | "?" | "~" | term | loobean | ref | typevar
266 | pathmold
264 | pathmold
267 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
265 | "(" ref mold { mold } ")" | "(" ref { mold } mlines
268 | "[" field { field } "]" | "[" { field } flines
266 | "[" field { field } "]" | "[" { field } flines
@@ -271,7 +269,7 @@ field = [ name "=" ] mold | "=" name ; (* =msg is msg=msg *)
271mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
269mlines = INDENT mold { NEWLINE mold } DEDENT ; (* a mold's ( left open *)
272flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
270flines = INDENT field { NEWLINE field } DEDENT ; (* a mold's [ left open *)
273pathmold = "/" [ segment { "/" segment } ] ;
271pathmold = "/" [ segment { "/" segment } ] ;
274−segment = knot | "[" name "=" ( aura | "_" ) "]" ;
272+segment = knot | "[" name "=" aura "]" ;
275
273
276pattern = term | number | string | ship | loobean | "~" | "*" | name
274pattern = term | number | string | ship | loobean | "~" | "*" | name
277 | "[" pattern { pattern } "]" ;
275 | "[" pattern { pattern } "]" ;
@@ -341,4 +339,4 @@ knot = { lower | digit | "-" | "." | "~" | "_" } ;
341 button "Add" %add
339 button "Add" %add
342```
340```
343
341
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.
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.
docs/spec/overview.md+6−8
@@ -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 if its cases differ as nouns, else an error where used |
66+| `$%`, `$?` | A union |
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−| Records with duplicate field names; cores, gates, vases, signed and float auras | An error where used |
75+| 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. 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.
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.
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`, `clap`; `clap` takes two units of the same type and a gate combining two values of that type into one of that type |
86+| Units | [2a](https://docs.urbit.org/hoon/stdlib/2a) | `fall`, `need`, `bind`, `biff` |
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` |
@@ -97,8 +97,6 @@ Hoon's standard library regrouped, written in Jibb and vendored as `/lib/jibb/pr
97| Parsers | [4d](https://docs.urbit.org/hoon/stdlib/4d)–[4i](https://docs.urbit.org/hoon/stdlib/4i), parser helpers in 4j and 4l | Left out, except the explicitly listed `slav` and `slaw` |
97| Parsers | [4d](https://docs.urbit.org/hoon/stdlib/4d)–[4i](https://docs.urbit.org/hoon/stdlib/4i), parser helpers in 4j and 4l | Left out, except the explicitly listed `slav` and `slaw` |
98| The rest | [1b](https://docs.urbit.org/hoon/stdlib/1b), [2p](https://docs.urbit.org/hoon/stdlib/2p), [3d](https://docs.urbit.org/hoon/stdlib/3d), [3f](https://docs.urbit.org/hoon/stdlib/3f), [4c](https://docs.urbit.org/hoon/stdlib/4c), [4n](https://docs.urbit.org/hoon/stdlib/4n), [4o](https://docs.urbit.org/hoon/stdlib/4o), [5a](https://docs.urbit.org/hoon/stdlib/5a)–[5f](https://docs.urbit.org/hoon/stdlib/5f) | Left out; `jam`, `cue` and `fein` run inside the runtime |
98| The rest | [1b](https://docs.urbit.org/hoon/stdlib/1b), [2p](https://docs.urbit.org/hoon/stdlib/2p), [3d](https://docs.urbit.org/hoon/stdlib/3d), [3f](https://docs.urbit.org/hoon/stdlib/3f), [4c](https://docs.urbit.org/hoon/stdlib/4c), [4n](https://docs.urbit.org/hoon/stdlib/4n), [4o](https://docs.urbit.org/hoon/stdlib/4o), [5a](https://docs.urbit.org/hoon/stdlib/5a)–[5f](https://docs.urbit.org/hoon/stdlib/5f) | Left out; `jam`, `cue` and `fein` run inside the runtime |
99
99
100−The prelude's `(like A)` mold describes a result with a product of type `A`. Its value gate `(like convert result)` maps a present product with `convert=$-(A B)` and returns `(like B)`, preserving the position and remaining input; an absent result stays absent.
101−
102Maps are Hoon's trees on both sides, so equal maps are equal nouns. Requests check incoming maps and sets with `apt`.
100Maps are Hoon's trees on both sides, so equal maps are equal nouns. Requests check incoming maps and sets with `apt`.
103
101
104## The Elm architecture on Urbit
102## The Elm architecture on Urbit
@@ -152,9 +150,9 @@ Loads and renders run in Nock.
152 [%url reply=$-(path M)]
150 [%url reply=$-(path M)]
153```
151```
154
152
155−- `poke`, `ask` and `qath` are transparent types defined in the internal prelude and re-exported normally. Derived gates and `pure` also construct requests. A derived poke constructor such as `(todo-action.todo [%add draft.m])` checks its value and supplies the agent and mark, so one island can poke several agents. The agent's mark rechecks on the ship; a nack's `tang` reaches the reply as text. Store constructors poke the store in the browser.
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.
156- A request such as `(todos.todo |=%got)` comes from a declared path or a store's `state`; its reply always gets full state. A path with diffs also takes a fold, `(changes.todo |=%got apply)`, which the runtime applies first. Facts are checked; a bad one crashes the reply, which counts as a crashed `update`.
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`.
157−- Islands read agents only by watching. A watch's first fact must be full state, so watching a request whose path case has a separate `scry=` path is a type error in an island. The checker must prove a request is watchable; unknown watchability is also a type error. The runtime acks facts, rewatches after a kick or a dropped connection and reseeds from the first fact; a refused watch shows the crash notice.
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.
158- Watches match by agent and path, timers by gap, and the newest reply is always used. After each `update`, `subs` is diffed to start and stop watches and timers. `%now` and `%every` give the time, `%who` the owner's `@p` from `/~/name`; `%wait` is a one-shot delay.
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.
159
157
160Inputs send a message per `input` event, and one per IME composition, so validation runs as you type; only commands reach the ship. After every event, controls reset to the latest view, so a toggle whose poke fails unchecks. A field's text is rewritten only when it differs, which keeps the caret. Fields are read-only until their island starts.
158Inputs send a message per `input` event, and one per IME composition, so validation runs as you type; only commands reach the ship. After every event, controls reset to the latest view, so a toggle whose poke fails unchecks. A field's text is rewritten only when it differs, which keeps the caret. Fields are read-only until their island starts.
docs/status.md+9−128
@@ -1,6 +1,6 @@
1# Status
1# Status
2
2
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.
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.
4
4
5| # | Milestone | Status |
5| # | Milestone | Status |
6| --- | --- | --- |
6| --- | --- | --- |
@@ -19,45 +19,9 @@ 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 parser accepts `_` in mold positions and typed path segments, retaining each hole’s span. The partial checker tracks ordinary annotation holes through inference and requires each value or local definition to resolve its own holes before generalization. A hole can resolve to a concrete type or an explicitly written in-scope type variable; later uses cannot fix an unresolved definition. Independent decimal holes can default, but captured variables are not defaulted prematurely. Structural named molds with an unresolved hole report its site. Complex mold forms, inferred path segments, mutual recursive groups and other unsupported constraints still fail closed, and the fragment does not claim the module is checked. A syntax-tree pass rejects duplicate field names within each written record and reports both sites. The repository spec now records that `ask` and `qath` are transparent; complete request checking remains outstanding.
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.
23
23
24−On 2026-10-31, @iko chose explicit, result-directed `(proj record)` to construct a record with exactly the expected fields, and reserved `proj` against definitions and imports. The partial checker handles selected explicit calls with known, closed record types, records field-selection evidence for later lowering, and reserves the name across source bindings. Reordered fields, some nested contexts and several open or recursive cases remain unsupported; lowering and execution are not implemented yet. The field-order question remains open.
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.
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. Construction and matching for other recursive shapes, broader patterns and dynamic application-path segments remain unsupported. A 256-step limit applies per inference attempt, not to parsing or retries; checking routes and static files remains milestone 4.
27−
28−The checker also recognizes a limited source-proven generic recursive tree in an import-free defining module. Its nominal identity retains the defining path, mold name and type arguments, including across supported imports and aliases. With a known expected type it can construct supported tagged cases by checking one source-proven layer at a time. Flat matches with two explicit tags also work for these source-proven trees, as does a missing-case diagnostic for a supported single-arm match. Broader pattern matching, general structural fits and gate-free proof remain unsupported; this is not yet the prelude's `element` implementation or island checking. The source index uses fixed-shape checks during mold collection. Each construction or supported pattern attempt has 256 unfolding steps and at most 4,096 face and substitution visits per scan; pattern subject recognition and view validation can each scan separately. Parsing, other inference and retries remain outside those limits. A single startup-inclusive comparison of 1,000 ordinary gates produced identical reports and used 29.12 seconds of user CPU before the shared-resolver refactor and 28.55 seconds after it, with other work running; it is not a general performance bound.
29−
30−The internal prelude defines a transparent generic `ask` with pure, agent and store cases, re-exported alongside the Jibb-written `pure` gate. The partial checker infers supported constructors and exhaustive matches. Agent and store receivers operate on raw nouns; their fields do not prove schema validity or watchability. The public prelude now defines the documented source-backed `sub` union; supported `%watch` payloads retain the public `(ask M)` type. Constructing a `sub` does not prove that its request is watchable. Request lowering, checked decoding, runtime validation and island watch checking remain unimplemented.
31−
32−Known same-origin generic-union result context can now constrain a call before its arguments are inferred. An unresolved or opaque constructor target stays unsupported rather than producing a definite mismatch; proven missing tags still report errors. A todo request with explicit `(ask msg)` context can infer `|=%got`; its uncontextualized form remains unsupported. A two-item literal-headed tuple can receive payload context from a known union of uniquely headed literal cells when its payload is a shallow wing-headed call with literal, wing or constructor arguments. Existing inference takes precedence when it fits; otherwise the checker tries the contextual path once. It conservatively declines that path when any substitution has a structural root, as well as for duplicate or opaque competitors. The guard scans substitutions per eligible tuple and may add one shallow inference; no global linear-time bound is claimed. This allows an explicitly typed todo subscription body to infer, but does not check the island or prove request watchability.
33−
34−A separate source-backed analysis can prove one named mold gate-free, report a definite gate with a field path, or return unknown. It retains the prepared prelude, source bundle, reader results and resolved imports; the actual todo model proves gate-free, while a callback field reports its path and `*` remains unknown. Its classifier is capped at 256 nodes, not the surrounding parse and import work. API, store and private roots are unsupported, and the artifact does not check a module or island, infer generalized constraints, or prove watchability.
35−
36−The partial checker can also match a directly named, checked root gate against a generic gate sample in a direct, unshadowed source-backed prelude call. It uses the written two-slot sample layouts to preserve nested record faces, then requires the complete call samples to be closed and tag-free and repeats the fit under the final substitution. The proof falls back to existing inference for unavailable or ambiguous source layouts, local or dynamic gates, aliases, recursive placeholders and open generic caller types. It preserves written-capital checks and projection evidence; it does not add `program`, check islands or prove request watchability. Prepared prelude source and interface remain a trusted pair.
37−
38−The API path analyzer can retain its source, complete prepared prelude, reader results and resolved dependencies as evidence, and classify a unique declaration as watchable, not watchable or unknown. It does not yet prove the provenance of request values or check island subscriptions. Prepared artifacts and reader results remain trusted host inputs.
39−
40−For a unique supported path declaration, the request-parts analysis derives ordered typed path parameters, a full-state reply sample and a fold type for one diff mark. Multiple diffs and unsupported or ambiguous evidence fail closed. By itself it does not create request gates or establish watchability of values.
41−
42−A separate supporting-definition analysis infers supported ordinary API molds and values and resolves all declared marks, retaining their source and dependency evidence. It fails closed on unsupported helpers or marks; unused `/-` cores are not independently validated, and definitions depending on derived gates remain unsupported. This does not check or export the whole API.
43−
44−Ordinary imports can infer derived request-gate types for multiple supported API paths. A case may take one typed segment before the reply or one diff fold after it; the unchanged todo API's plain, typed and diff requests infer, including a named closed fold. Checked ordinary API definitions, mark molds and a supported poke constructor are exported. Each `/sur` core must have a directly used, successfully read mold; unselected bindings are not independently validated. Jibb module imports, scry paths, multiple parameters or diffs and a parameter together with a fold remain unsupported. Source-qualified request evidence and exact trusted graph inputs survive transitive imports and cached interfaces, while stale or ambiguous evidence fails closed. This is a type-only interface: request execution, schema validation and proof that a request value is watchable remain unimplemented. In one loaded-machine run, the real-todo eval took 195.83 s wall and 67.83 s user CPU; the prior prototype took 111.81 s wall and 64.60 s user. Both include Hoon compilation and reader setup and overlapped other work, so they are not isolated checker benchmarks.
45−
46−The Hoon reader's tagged-union source proof also handles `$~` default wrappers. A shared eval and ship golden exercises the unmodified Tlon `epic.saga` mold as a named payload in a labeled downstream extension, alongside overlap, recursive, shadow and malformed-wrapper controls. The tagged-source helper peels at most four consecutive defaults; defaults inside dependency proofs spend the existing semantic-node budget. Other unverified nested unions and dependencies remain unsupported.
47−
48−The repository spec records the subsequent type-system and prelude decisions, including the chosen `like` result-mapping gate; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds, including Tlon `notes.import-node` with list-wrapped self references, cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, including source-validated named operands such as Tlon `notes.log`, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies private comparison and arithmetic schemes to the Jibb-written `gth`, `add` and `dec` wrappers; ordinary imports cannot access them. The public `add` and `dec` wrappers use private arithmetic interfaces; supported inference preserves the shared atom constraint that excludes loobeans. Primitive execution, jet recognition and length remain unfinished. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not by itself create requests or check an API module. Ordinary imports additionally infer the supported multi-path request-gate types described above. Complete private module checking, other API shapes, request lowering, root API and kind checking, stores, complete `ask` and `pure` checking and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude includes the doc-exact generic `cmd` union; the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, a grouped wing or a supported shallow call, including nested cell and list positions; other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Literal singleton heads compare by runtime noun, so `|=%$` also matches explicit null- and loobean-zero-headed cases. When equal heads have disjoint payloads, the constructor selects a uniquely proven compatible payload; unknown and ambiguous candidates remain unsupported. Unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the agreed shared-type `clap`; supported calls infer, while backend validation remains outstanding, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
49−
50−The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn` and `lent`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. The source-only `+prepare-prelude` rejects empty, malformed, conflicting or import-bearing source; `+prepare-prelude-with-internal` also accepts the supported private internal import. Prepared values are trusted and must come unchanged from the matching preparation arm. When canonical public list or unit templates are missing or altered, independently inferred private molds remain available, while molds that depend on those templates do not. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
51−
52−The prelude also has a Jibb-written `zing` that concatenates homogeneous lists via `weld`. Its focused golden infers empty, nested text, ship, generic and gate-element lists and reports a non-list error; the same golden passes on the ship. A Hoon translation agrees with Hoon `zing` on selected finite inputs, not on Jibb execution. Hoon’s raw helper additionally accepts heterogeneous noun lists, which the Jibb signature does not express. Backend lowering and jet recognition remain unverified.
53−
54−An eval and ship fixture now reports partial inference for the unchanged todo island with its real API and Hoon readers. It verifies that the source fixtures match `my-app` and exercises missing or duplicate imports; the report does not claim the module or island has been checked. The prelude also has a Jibb-written recursive `lent` whose supported generic calls infer `@ud`. Execution and shape-based jet recognition remain future backend work. Nested union tests check equal runtime nouns, different nested tags, empty fields and unknown inhabitation.
55−
56−The prelude now writes `lth`, `gte` and `lte` in Jibb using `gth` and `not`. Supported generic and concrete calls infer, including loobeans; mismatched explicit auras fail. Execution, jet recognition and complete import checking remain unfinished.
57−
58−The Hoon reader can prove overlaps among supported original `$?` source cases, including nested cells and unions with more than two cases, and report them at a Jibb use site. It evaluates each case independently and compares runtime noun values. Other overlaps, Hoon case locations and mark-reader overlap diagnostics remain unfinished. The source screen allows at most 128 cases and 4,096 source noun nodes; dependency checking and pairwise witness analysis each have a separate 4,096-node budget. These budgets do not bound chapter lookup, Hoon evaluation or graph walks.
59−
60−Restricted-number promotion now skips an environment scan when a definition has no written capitals. In a single startup-inclusive pair on 2,000 independent gates, output was identical and user CPU fell from 71.67 to 38.26 seconds; wall time was 72.80 versus 51.66 seconds with other checks running. This is a partial-inference measurement, not a complete checker or a bound on dependent modules.
61
25
62## Milestone 1: parser and mark
26## Milestone 1: parser and mark
63
27
@@ -75,9 +39,9 @@ What the plan asks for, and where it is:
75
39
76Besides the plan's list:
40Besides the plan's list:
77
41
78−- 653 golden cases: 433 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.
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.
79−- The 653-case corpus passed under `urbit eval` in 94.1 s while other checks were running. The fake ship passed all 690 tests, including the source-overlap, structural-overlap, generic-recursion, generic-construction and generic-pattern fixtures, importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union, gate-free and direct-gate guards and the unchanged todo report. Desk sync took 80.9 s while other checks were running. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
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.
80−- `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.
44+- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
81- 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.
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.
82- 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).
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).
83
47
@@ -117,108 +81,25 @@ Besides the plan's list:
117| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
81| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
118| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
82| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
119| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
83| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
120−| a2a6ef5 | 2026-10-30 | Infer complete list-shaped branches |
84+| This change | 2026-10-30 | Infer complete list-shaped branches |
121−| 671fe72 | 2026-10-30 | Infer contextual list nulls and cons cells |
122−| 7e69436 | 2026-10-30 | Infer selected self-recursive gates |
123−| 9ab52e8 | 2026-10-30 | Infer recursive branches with closed base types |
124−| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
125−| c7082e0 | 2026-10-30 | Infer multi-argument calls |
126−| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
127−| 1470d18 | 2026-10-30 | Infer selected prelude list helpers |
128−| 10cbf9c | 2026-10-30 | Infer selected local recursive gates and distinguish reader diagnostics |
129−| 45afb13 | 2026-10-30 | Infer local capital scopes and report direct reader diagnostics |
130−| 054e651 | 2026-10-30 | Report nested reader diagnostics |
131−| 98c19cd | 2026-10-30 | Infer known-aura string interpolation |
132−| ddba633 | 2026-10-30 | Infer top-level mutually recursive gates |
133−| 9f1517e | 2026-10-30 | Infer whole-case union patterns and prelude `turn` |
134−| 9dd35c8 | 2026-10-31 | Match finite boolean refinements of union cases |
135−| 54852d4 | 2026-10-31 | Contextualize tuple calls and infer known record changes |
136−| 0bc5113 | 2026-10-31 | Contextualize record initializers and infer unit construction |
137−| 264a436 | 2026-10-31 | Contextualize unit payloads in casts, calls and nested values |
138−| a140383 | 2026-10-31 | Report missing union tags and infer prelude unit helpers |
139−| d69cc52 | 2026-10-31 | Infer longer cell binder patterns and prelude unit helpers |
140−| ae35005 | 2026-10-31 | Import source-verified tagged Hoon unions |
141−| c8f894a | 2026-10-31 | Report nested missing tags and contextualize union branch results |
142−| ef2ea71 | 2026-10-31 | Import Hoon null singleton cases |
143−| 67f900e | 2026-10-31 | Infer local mutual gates and uncontextualized lists |
144−| 7ff15f1 | 2026-10-31 | Contextualize finite union patterns and record the initial poke decision |
145−| c790a9f | 2026-10-31 | Expose transparent `poke` from the internal prelude |
146−| ef4772a | 2026-10-31 | Bridge imported loobeans and loobean singletons |
147−| ad46655 | 2026-10-31 | Bridge selected imported any-noun molds |
148−| beada10 | 2026-10-31 | Import source-proved Ford mark unions, analyze API paths and infer list helpers |
149−| e28f7be | 2026-10-31 | Diagnose proven non-gate cycles and import Tlon null-payload union cases |
150−| fd2f288 | 2026-10-31 | Infer qualified fields of imported values |
151−| ed9291e | 2026-10-31 | Infer term-headed pairs and function helpers, and import nested named unions |
152−| ad0265e | 2026-10-31 | Infer proven single-case patterns and the prelude command union |
153−| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
154−| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
155−| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
156−| 4e472b5 | 2026-10-31 | Pass known named unions through polymorphic gates |
157−| e3e184f | 2026-10-31 | Parse type holes, reject duplicate written record fields, and extend partial union inference and imports |
158−| 80e221a | 2026-10-31 | Infer supported annotation holes and prelude list aliases |
159−| ba1fec4 | 2026-10-31 | Add the curried `bond` prelude gate |
160−| 0ea700d | 2026-10-31 | Infer a source-defined recursive `qath` subset and record the explicit `proj` decision |
161−| 75f5952 | 2026-10-31 | Check a subset of explicit `proj` calls and retain their lowering evidence |
162−| cf17925 | 2026-10-31 | Infer supported single-field projections |
163−| 1a891e2 | 2026-10-31 | Infer source-backed addition and decrement without loobean operands; record the watchability decision |
164−| 81af5fd | 2026-10-31 | Preserve public names of identity-generic union aliases and record the `like` decision |
165−| 640a442 | 2026-10-31 | Add the source-backed `like` result mapper and infer supported positional calls |
166−| 445a0a1 | 2026-10-31 | Retain source-backed API path evidence and classify declarations |
167−| f69493d | 2026-10-31 | Derive supported request components from API declarations |
168−| f0f6954 | 2026-10-31 | Analyze supported API helper definitions and declared marks |
169−| 3f55af7 | 2026-10-31 | Define source-backed transparent ask and pure |
170−| ae1ec26 | 2026-10-31 | Prove selected default-wrapped Hoon unions from source |
171−| dde791c | 2026-10-31 | Infer a source-backed request-gate type through ordinary imports |
172−| a1c5f35 | 2026-10-31 | Infer supported multi-path requests and named closed folds |
173−| 911ca0c | 2026-10-31 | Propagate union context, define subscriptions and match literal nouns |
174−| 72acdb3 | 2026-10-31 | Infer selected nested union payloads from context |
175−| 706035c | 2026-10-31 | Analyze gate-free source molds with field witnesses |
176−| 651b8ec | 2026-10-31 | Match source-proven gate samples in direct calls |
177−| cc8e389 | 2026-10-31 | Add source-backed list length and real todo regression |
178−| 4da6891 | 2026-10-31 | Add source-backed comparisons and nested Hoon union controls |
179−| 09db390 | 2026-10-31 | Skip unnecessary inference environment scans |
180−| 179d717 | 2026-10-31 | Diagnose source-proven Hoon union overlaps |
181−| 142f2e2 | 2026-10-31 | Prove structural overlaps across Hoon union cases |
182−| c96597d | 2026-10-31 | Track source-proven generic recursive identities |
183−| 190a9d5 | 2026-10-31 | Add source-backed list flattening |
184−| d9d51e6 | 2026-10-31 | Check source-proven recursive tree construction |
185−| This change | 2026-10-31 | Match source-proven recursive tree cases |
186
85
187## Checking it
86## Checking it
188
87
189On a machine set up as [development.md](development.md) says:
88On a machine set up as [development.md](development.md) says:
190
89
191```
90```
192−tools/golden # 653 cases under urbit eval
91+tools/golden # 501 cases under urbit eval
193tools/importer-test # the Hoon importer fixture projection
92tools/importer-test # the Hoon importer fixture projection
194−tools/type-import-default-test # default-wrapped source proof golden
195tools/type-import-test # the importer/checker bridge fixture
93tools/type-import-test # the importer/checker bridge fixture
196−tools/type-import-overlap-test # source-aware Hoon overlap and provenance fixture
197−tools/type-import-structural-test # structural overlap and multi-case source fixture
198−tools/type-tlon-test # the real Tlon reader/checker fixture
199tools/type-mark-test # the mark/checker bridge fixture
94tools/type-mark-test # the mark/checker bridge fixture
200−tools/type-poke-test # the source-backed poke/API fixture
201−tools/type-api-evidence-test # API declaration evidence guards
202−tools/type-api-paths-test # partial API path metadata fixture
203−tools/type-hole-guards-test # hole defaulting and API interface guards
204−tools/type-list-alias-test # prelude list-alias guards
205−tools/type-generic-alias-test # generic union alias guards
206−tools/type-generic-recursion-test # source-proven generic recursion guards
207−tools/type-generic-construction-test # source-proven recursive construction guards
208−tools/type-generic-pattern-test # source-proven recursive pattern guards
209−tools/type-positional-face-guards-test # positional sample face guards
210−tools/type-qath-guards-test # qath source and unfolding guards
211−tools/type-ask-guards-test # ask source and bootstrap guards
212−tools/type-proj-guards-test # projection evidence and scope guards
213tools/type-module-scope-test # module and prelude scope fixture
95tools/type-module-scope-test # module and prelude scope fixture
214tools/hoon check-spans-test # prints <<>> when the span checker works
96tools/hoon check-spans-test # prints <<>> when the span checker works
215tools/testdata/selftest # the tools themselves
97tools/testdata/selftest # the tools themselves
216tools/doc-blocks docs/spec # the doc's examples are golden cases
98tools/doc-blocks docs/spec # the doc's examples are golden cases
217tools/ship start
99tools/ship start
218tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
100tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
219−tools/ship test # the same 653 cases as -test arms on the ship
101+tools/ship test # the same 501 cases as -test arms on the ship
220tools/testdata/ship-selftest
102tools/testdata/ship-selftest
221−tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
222tools/ship check-commit # |commit stores .jibb files
103tools/ship check-commit # |commit stores .jibb files
223tools/clay-fixtures # example /sur files and marks build through Clay
104tools/clay-fixtures # example /sur files and marks build through Clay
224```
105```
jibb-dev/lib/jibb-import.hoon+32−894
@@ -8,8 +8,7 @@
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. A proven
11+:: a repeated named hold becomes a module-qualified reference.
12−:: nested self-recursive tagged union retains its own named boundary.
13::
12::
14:: A direct $^ is read from its original branches and accepted only when
13:: A direct $^ is read from its original branches and accepted only when
15:: their imported shapes prove disjoint. A single nested $^ in a
14:: their imported shapes prove disjoint. A single nested $^ in a
@@ -25,10 +24,9 @@
25:: the other fields are fixed atoms or collections of static atoms;
24:: the other fields are fixed atoms or collections of static atoms;
26:: other source shapes fail closed.
25:: other source shapes fail closed.
27::
26::
28−:: The partial checker bridges supported nouns, atoms, cells, faces,
27+:: The checker has a small bridge for successful unfaced atom and cell
29−:: proven forks and collections, and keeps proven recursive roots nominal.
28+:: results; it rejects other importer shapes. Failures return %|; no
30−:: Unsupported shapes fail closed. Reader failures return %|; no partial
31−:: tree is returned as success.
29+:: partial tree is returned as success.
32::
30::
33|%
31|%
34+$ imported
32+$ imported
@@ -39,16 +37,9 @@
39 [%cell head=imported tail=imported]
37 [%cell head=imported tail=imported]
40 [%face name=term body=imported]
38 [%face name=term body=imported]
41 [%fork cases=(list imported)]
39 [%fork cases=(list imported)]
42− [%named module=term name=term body=imported]
43 [%apply name=term args=(list imported)]
40 [%apply name=term args=(list imported)]
44 [%ref module=term name=term]
41 [%ref module=term name=term]
45 [%bad reason=@t]
42 [%bad reason=@t]
46− [%invalid code=?(%aura %core) reason=@t]
47− ==
48−+$ import-diagnostic
49− $% [%ok value=imported]
50− [%invalid code=?(%aura %core %overlap) message=@t]
51− [%unsupported message=@t]
52 ==
43 ==
53+$ signatures (list [name=term code=hoon])
44+$ signatures (list [name=term code=hoon])
54+$ visiting (list [typ=type name=(unit term)])
45+$ visiting (list [typ=type name=(unit term)])
@@ -79,445 +70,6 @@
79 ^- (each imported @t)
70 ^- (each imported @t)
80 (read-with module name typ ~)
71 (read-with module name typ ~)
81::
72::
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−::
137−:: Bound the new $? branch screen independently of the existing $% path.
138−:: Count raw noun nodes across all cases, and cap pairwise tag comparisons.
139−++ bounded-no-spec-unions
140− |= [h=* fuel=@ud]
141− ^- (unit @ud)
142− ?: =(fuel 0) ~
143− =. fuel (dec fuel)
144− ?@ h `fuel
145− ?: ?=([%bckt ^ ^] h) ~
146− ?: ?=([%bcwt [^ [^ *]]] h) ~
147− ?: ?=([%bccn [^ [^ *]]] h) ~
148− =/ left=(unit @ud) $(h -.h)
149− ?~ left ~
150− $(h +.h, fuel u.left)
151−++ tagged-bounded-cases
152− |= [cases=(list spec) tags=(list @) fuel=@ud left=@ud]
153− ^- (unit (list tagged-case))
154− ?~ cases `~
155− ?: =(left 0) ~
156− =/ remaining=(unit @ud) (bounded-no-spec-unions i.cases fuel)
157− ?~ remaining ~
158− =/ tag=(unit @) (tagged-head i.cases)
159− ?~ tag ~
160− ?: (lien tags |=(x=@ =(x u.tag))) ~
161− =/ rest $(cases t.cases, tags [u.tag tags], fuel u.remaining, left (dec left))
162− ?~ rest ~
163− `[[u.tag i.cases] u.rest]
164−::
165−:: Benign source annotations have different typed representations on
166−:: Clay and under eval. Inspect the wrapper as a noun, and validate the
167−:: contained Hoon before examining an arm.
168−++ source-note-tail
169− |= raw=*
170− ^- (unit *)
171− ?: ?=([%note [%help *] *] raw) `+.+.raw
172− ?: ?=([%dbug * *] raw) `+.+.raw
173− ~
174−::
175−++ source-note-unwrap
176− |= [raw=* left=@ud]
177− ^- (unit *)
178− =/ wrapper=(unit *) (source-note-tail raw)
179− ?~ wrapper `raw
180− ?: =(left 0) ~
181− $(raw u.wrapper, left (dec left))
182−::
183−:: A bounded $~ source wrapper changes the default, not the mold.
184−:: Each annotation chain and default chain is separately bounded.
185−++ tagged-default-union
186− |= [body=spec left=@ud]
187− ^- (unit spec)
188− =/ plain=(unit *) (source-unwrap body 4)
189− ?~ plain ~
190− =. body ;;(spec u.plain)
191− ?. ?=([%bcsg *] body) `body
192− ?: =(left 0) ~
193− $(body q.body, left (dec left))
194−::
195−++ tagged-source-code
196− |= [code=hoon name=term]
197− ^- (unit (list tagged-case))
198− =/ found=(unit spec) (local-mold-spec code name)
199− ?~ found ~
200− =/ body=(unit spec) (tagged-default-union u.found 4)
201− ?~ body ~
202− ?- u.body
203− [%bccn *]
204− =/ cases=(list spec) p.u.body
205− ?~ cases ~
206− ?~ t.cases ~
207− (tagged-cases cases ~)
208− [%bcwt *]
209− =/ cases=(list spec) p.u.body
210− ?~ cases ~
211− ?~ t.cases ~
212− (tagged-bounded-cases cases ~ 4.096 128)
213− * ~
214− ==
215−::
216−:: Source proof for dependencies of an explicitly tagged union. Only
217−:: simple local molds, standard collections and distinct term enums are
218−:: accepted; computed molds, nested cell unions and cycles fail closed.
219−:: One shared fuel budget bounds repeated visits through acyclic aliases;
220−:: exhaustion or an inherited same-name arm leaves the result unsupported.
221−++ local-arm-source
222− |= [cor=type name=term]
223− ^- (unit hoon)
224− ?. ?=([%core *] cor) ~
225− =/ chapters=(map term tome) q.r.q.cor
226− =/ all=(list [term tome]) ~(tap by chapters)
227− ?: (lien all |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
228− =/ chapter=(unit tome) (~(get by chapters) %$)
229− ?~ chapter ~
230− (chapter-source u.chapter name)
231−::
232−++ local-mold-spec
233− |= [code=hoon name=term]
234− ^- (unit spec)
235− =/ plain=(unit *) (source-note-unwrap code 4)
236− ?~ plain ~
237− =. code ;;(hoon u.plain)
238− ?+ code ~
239− [%ktcl *]
240− ?. ?=([%name * *] p.code) ~
241− ?. =(name p.p.code) ~
242− `q.p.code
243− ==
244−::
245−++ safe-source-enum
246− |= [cases=(list spec) seen=(list @) fuel=@ud]
247− ^- (unit @ud)
248− ?~ cases `fuel
249− ?: =(fuel 0) ~
250− =/ tag=(unit @) (tagged-term i.cases)
251− ?~ tag ~
252− ?: (lien seen |=(n=@ =(n u.tag))) ~
253− $(cases t.cases, seen [u.tag seen], fuel (dec fuel))
254−::
255−++ safe-source-specs-mode
256− |= [xs=(list spec) cor=type seen=(list term) fuel=@ud allow-nested=?]
257− ^- (unit @ud)
258− ?~ xs `fuel
259− =/ left=(unit @ud) (safe-source-spec-mode i.xs cor seen fuel allow-nested)
260− ?~ left ~
261− $(xs t.xs, fuel u.left)
262−::
263−++ safe-source-name-mode
264− |= [name=term cor=type seen=(list term) fuel=@ud allow-nested=?]
265− ^- (unit @ud)
266− :: Permit a direct root revisit or one proven nested self-revisit.
267− :: Mutual cycles and inherited same-name bindings remain unavailable.
268− ?: (lien seen |=(x=term =(name x)))
269− ?. ?=([%core *] cor) ~
270− ?. (scope-safe p.cor name) ~
271− ?: =(seen ~[name]) `fuel
272− ?. allow-nested ~
273− ?. ?=([* [* ~]] seen) ~
274− ?. =(i.seen name) ~
275− =/ selected=(unit hoon) (local-arm-source cor name)
276− ?~ selected ~
277− =/ cases=(unit (list tagged-case)) (tagged-source-code u.selected name)
278− ?~ cases ~
279− `fuel
280− =/ arm=(unit hoon) (local-arm-source cor name)
281− ?~ arm
282− ?. &(|(=(name %ship) =(name %path)) (scope-safe cor name)) ~
283− `fuel
284− ?. ?=([%core *] cor) ~
285− ?. (scope-safe p.cor name) ~
286− =/ body=(unit spec) (local-mold-spec u.arm name)
287− ?~ body ~
288− (safe-source-spec-mode u.body cor [name seen] fuel allow-nested)
289−::
290−++ safe-source-spec-mode
291− |= [shape=spec cor=type seen=(list term) fuel=@ud allow-nested=?]
292− ^- (unit @ud)
293− =/ plain=(unit *) (source-unwrap shape 4)
294− ?~ plain ~
295− =. shape ;;(spec u.plain)
296− ?: =(fuel 0) ~
297− =. fuel (dec fuel)
298− ?+ shape ~
299− [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
300− [%leaf *] `fuel
301− [%bcsg *] $(shape q.shape)
302− [%bcts *] ?@ p.shape $(shape q.shape)
303− ~
304− [%bccl *] (safe-source-specs-mode p.shape cor seen fuel allow-nested)
305− [%bccn *]
306− :: A source proof may cross one named union dependency. Deeper
307− :: named unions stay unsupported to bound recursive reprojection.
308− ?. allow-nested ~
309− ?. ?=([* [* ~]] seen) ~
310− =/ cases=(unit (list tagged-case)) (tagged-cases p.shape ~)
311− ?~ cases ~
312− ?~ u.cases ~
313− ?~ t.u.cases ~
314− (safe-source-tagged-fuel-mode u.cases cor seen fuel allow-nested)
315− [%bcwt *] (safe-source-enum p.shape ~ fuel)
316− [%like *]
317− ?. ?=([@ ~] p.shape) ~
318− ?. ?=(~ q.shape) ~
319− (safe-source-name-mode i.p.shape cor seen fuel allow-nested)
320− [%make *]
321− =/ wing=(unit term) (source-single-wing p.shape)
322− ?~ wing ~
323− =/ n=term u.wing
324− ?. (lien `(list term)`~[%map %set %qeu %list %unit %jar %jug] |=(x=term =(x n))) ~
325− ?. (scope-safe cor n) ~
326− (safe-source-specs-mode q.shape cor seen fuel allow-nested)
327− ==
328−::
329−++ safe-source-tagged-fuel-mode
330− |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud allow-nested=?]
331− ^- (unit @ud)
332− ?~ cases `fuel
333− =/ left=(unit @ud) (safe-source-spec-mode branch.i.cases cor seen fuel allow-nested)
334− ?~ left ~
335− $(cases t.cases, fuel u.left)
336−::
337−++ safe-source-name
338− |= [name=term cor=type seen=(list term) fuel=@ud]
339− ^- (unit @ud)
340− (safe-source-name-mode name cor seen fuel &)
341−::
342−++ safe-source-tagged
343− |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud]
344− ^- ?
345− ?=(^ (safe-source-tagged-fuel-mode cases cor seen fuel &))
346−::
347−++ tagged-union-fallback
348− |= [module=term name=term cor=type]
349− ^- (unit (each imported @t))
350− ?. ?=([%core *] cor) ~
351− =/ chapters=(map term tome) q.r.q.cor
352− =/ other=(list [term tome]) ~(tap by chapters)
353− ?: (lien other |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
354− =/ chapter=(unit tome) (~(get by chapters) %$)
355− ?~ chapter ~
356− =/ selected=(unit hoon) (chapter-source u.chapter name)
357− ?~ selected ~
358− =/ cases (tagged-source-code u.selected name)
359− ?~ cases ~
360− :: Preserve the original budget when no nested union recovery is needed.
361− =/ plain=? ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |))
362− ?. |(plain (safe-source-tagged u.cases cor ~[name] 256)) ~
363− =/ tried=(each (list type) tang)
364− (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
365− ?. ?=([%& *] tried) ~
366− :: Record the selected hold before projecting branches so an exact
367− :: recursive revisit can retain its independently verified origin.
368− =/ selected-type=(each type tang)
369− (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
370− ?. ?=([%& *] selected-type) ~
371− =/ projected=(each (list imported) tang)
372− (mule |.((turn p.tried |=(t=type (walk module t catalog ~[[p.selected-type [~ name]]] `cor)))))
373− ?. ?=([%& *] projected) ~
374− ?^ (first-bads p.projected) ~
375− ?. (all-disjoint p.projected) ~
376− =/ xs=(list tagged-case) u.cases
377− =/ ys=(list imported) p.projected
378− |-
379− ?~ xs
380− ?^ ys ~
381− `[%& [%fork (sort p.projected |=(pair=[imported imported] (dor -.pair +.pair)))]]
382− ?~ ys ~
383− ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
384− ?. =(tag.i.xs u.value.head.i.ys) ~
385− $(xs t.xs, ys t.ys)
386−
387−::
388−:: Unlike the disjoint-reader fallback, source overlap may have repeated
389−:: tags. Bound both raw case traversal and the number of pair attempts.
390−++ overlap-source-cases
391− |= [cases=(list spec) fuel=@ud left=@ud]
392− ^- (unit (list tagged-case))
393− ?~ cases `~
394− ?: =(left 0) ~
395− =/ remaining=(unit @ud) (bounded-no-spec-unions i.cases fuel)
396− ?~ remaining ~
397− =/ tag=(unit @) (tagged-head i.cases)
398− ?~ tag ~
399− =/ rest $(cases t.cases, fuel u.remaining, left (dec left))
400− ?~ rest ~
401− `[[u.tag i.cases] u.rest]
402−++ overlap-repeated-tag
403− |= cases=(list tagged-case)
404− ^- ?
405− ?~ cases |
406− ?: (lien t.cases |=(c=tagged-case =(tag.c tag.i.cases))) &
407− $(cases t.cases)
408−++ overlap-projections-match
409− |= [xs=(list tagged-case) ys=(list imported)]
410− ^- ?
411− ?~ xs ?=(~ ys)
412− ?~ ys |
413− ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) |
414− ?. =(tag.i.xs u.value.head.i.ys) |
415− $(xs t.xs, ys t.ys)
416−++ overlap-source-witness
417− |= [module=term name=term cor=type]
418− ^- ?
419− ?. ?=([%core *] cor) |
420− =/ selected=(unit hoon) (local-arm-source cor name)
421− ?~ selected |
422− =/ shape=(unit spec) (local-mold-spec u.selected name)
423− ?~ shape |
424− =/ body=(unit spec) (tagged-default-union u.shape 4)
425− ?~ body |
426− ?. ?=([%bcwt *] u.body) |
427− =/ cases=(unit (list tagged-case)) (overlap-source-cases p.u.body 4.096 128)
428− ?~ cases |
429− ?. (overlap-repeated-tag u.cases) |
430− ?. ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |)) |
431− =/ tried=(each (list type) tang)
432− (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
433− ?. ?=([%& *] tried) |
434− =/ projected=(each (list imported) tang)
435− (mule |.((turn p.tried |=(t=type (walk module t catalog ~ `cor)))))
436− ?. ?=([%& *] projected) |
437− ?^ (first-bads p.projected) |
438− ?. (overlap-projections-match u.cases p.projected) |
439− =/ witness=(unit overlap-proof-result) (overlap-case-pairs p.projected 4.096)
440− ?~ witness |
441− found.u.witness
442−::
443−:: Positive overlap evidence only: false means no proof, not disjointness.
444−:: Fuel is shared across all examined nodes and sibling alternatives.
445−+$ overlap-proof-result [found=? left=@ud]
446−++ overlap-known-atom
447− |= aura=term
448− ^- ?
449− (lien `(list term)`~[%t %tas %ud %f] |=(n=term =(n aura)))
450−++ overlap-inhabited-list
451− |= [xs=(list imported) fuel=@ud]
452− ^- (unit overlap-proof-result)
453− ?~ xs `[| fuel]
454− ?: =(0 fuel) ~
455− =/ one=(unit overlap-proof-result) (overlap-inhabited i.xs (dec fuel))
456− ?~ one ~
457− ?: found.u.one one
458− $(xs t.xs, fuel left.u.one)
459−++ overlap-inhabited
460− |= [x=imported fuel=@ud]
461− ^- (unit overlap-proof-result)
462− ?: =(0 fuel) ~
463− =. fuel (dec fuel)
464− ?- x
465− [%noun *] `[& fuel]
466− [%void *] `[| fuel]
467− [%atom *] `[|(?=(^ value.x) (overlap-known-atom aura.x)) fuel]
468− [%face *] $(x body.x)
469− [%named *] $(x body.x)
470− [%fork *] (overlap-inhabited-list cases.x fuel)
471− [%cell *]
472− =/ a=(unit overlap-proof-result) $(x head.x)
473− ?~ a ~
474− ?. found.u.a a
475− $(x tail.x, fuel left.u.a)
476− * `[| fuel]
477− ==
478−++ overlap-pair-list
479− |= [xs=(list imported) y=imported fuel=@ud]
480− ^- (unit overlap-proof-result)
481− ?~ xs `[| fuel]
482− ?: =(0 fuel) ~
483− =/ p=(unit overlap-proof-result) (overlap-pair i.xs y (dec fuel))
484− ?~ p ~
485− ?: found.u.p p
486− $(xs t.xs, fuel left.u.p)
487−++ overlap-pair
488− |= [a=imported b=imported fuel=@ud]
489− ^- (unit overlap-proof-result)
490− ?: =(0 fuel) ~
491− =. fuel (dec fuel)
492− ?: ?=([%face *] a) $(a body.a)
493− ?: ?=([%face *] b) $(b body.b)
494− ?: ?=([%named *] a) $(a body.a)
495− ?: ?=([%named *] b) $(b body.b)
496− ?: ?=([%fork *] a) (overlap-pair-list cases.a b fuel)
497− ?: ?=([%fork *] b) (overlap-pair-list cases.b a fuel)
498− ?: ?=([%noun *] a) (overlap-inhabited b fuel)
499− ?: ?=([%noun *] b) (overlap-inhabited a fuel)
500− ?: &(?=([%cell *] a) ?=([%cell *] b))
501− =/ p=(unit overlap-proof-result) $(a head.a, b head.b)
502− ?~ p ~
503− ?. found.u.p p
504− $(a tail.a, b tail.b, fuel left.u.p)
505− ?. &(?=([%atom *] a) ?=([%atom *] b)) `[| fuel]
506− ?^ value.a
507− ?^ value.b `[=(u.value.a u.value.b) fuel]
508− `[&(=(u.value.a 0) (overlap-known-atom aura.b)) fuel]
509− ?^ value.b `[&(=(u.value.b 0) (overlap-known-atom aura.a)) fuel]
510− `[&((overlap-known-atom aura.a) (overlap-known-atom aura.b)) fuel]
511−++ overlap-case-pairs
512− |= [xs=(list imported) fuel=@ud]
513− ^- (unit overlap-proof-result)
514− ?~ xs `[| fuel]
515− ?: =(0 fuel) ~
516− =/ p=(unit overlap-proof-result) (overlap-pair-list t.xs i.xs (dec fuel))
517− ?~ p ~
518− ?: found.u.p p
519− $(xs t.xs, fuel left.u.p)
520−::
521:: +read-mold-in: accept the /sur core as provenance. The core must be
73:: +read-mold-in: accept the /sur core as provenance. The core must be
522:: built against zuse or validated Ford imports, and its selected arm
74:: built against zuse or validated Ford imports, and its selected arm
523:: must be this type. Unknown subject shapes fail closed.
75:: must be this type. Unknown subject shapes fail closed.
@@ -532,15 +84,9 @@
532 [%| (crip "Hoon mold `{(trip name)}` is not declared")]
84 [%| (crip "Hoon mold `{(trip name)}` is not declared")]
533 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
85 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
534 [%| 'Hoon module provenance does not match the selected mold']
86 [%| 'Hoon module provenance does not match the selected mold']
535− =/ overlap=(each ? tang) (mule |.((overlap-source-witness module name cor)))
536− ?: &(?=(%& -.overlap) p.overlap) [%| 'Hoon union cases overlap']
537 =/ result (read-with module name typ [~ cor])
87 =/ result (read-with module name typ [~ cor])
538− ?: ?=([%& *] result) result
88+ ?. ?=([%& *] result) result
539− =/ fallback=(each (unit (each imported @t)) tang)
540− (mule |.((tagged-union-fallback module name cor)))
541− ?: ?=(%| -.fallback) result
542− ?~ p.fallback result
89+ result
543− u.p.fallback
544::
90::
545:: +read-named is the source-aware entry point for callers that have
91:: +read-named is the source-aware entry point for callers that have
546:: not selected a Hoon type yet. Check the core and the local arm
92:: not selected a Hoon type yet. Check the core and the local arm
@@ -569,41 +115,6 @@
569:: A mark door's payload is [sample build-subject]. Its outer sample
115:: A mark door's payload is [sample build-subject]. Its outer sample
570:: face names the door sample, not the imported mark type. Collection
116:: face names the door sample, not the imported mark type. Collection
571:: lookup for the sample happened against the pre-door build subject.
117:: lookup for the sample happened against the pre-door build subject.
572−:: Fallback for a mark whose sample is exactly one arm of its only
573−:: Ford-imported /sur core. Source validation remains in read-mold-in.
574−:: Recursive results need a separate mark-origin/interface design.
575−++ mark-has-ref
576− |= node=imported
577− ^- ?
578− ?- node
579− [%ref *] &
580− [%named *] $(node body.node)
581− [%face *] $(node body.node)
582− [%cell *] |($(node head.node) $(node tail.node))
583− [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
584− [%apply *] (lien args.node |=(child=imported (mark-has-ref child)))
585− * |
586− ==
587−::
588−++ mark-union-fallback
589− |= [raw=type context=type]
590− ^- (unit (each imported @t))
591− ?. ?=([%cell [%face @ [%core *]] *] context) ~
592− ?. =(q.context -:!>(..zuse)) ~
593− =/ alias=term p.p.context
594− =/ core=type q.p.context
595− ?. ?=([%hold *] raw) ~
596− =/ name=(unit term) (hold-name q.raw)
597− ?~ name ~
598− =/ selected=(each type tang)
599− (mule |.((~(play ut core) (ream (cat 3 '*' u.name)))))
600− ?. ?=([%& *] selected) ~
601− ?. =(p.selected raw) ~
602− =/ result=(each imported @t) (read-mold-in alias u.name raw core)
603− ?. ?=([%& [%fork *]] result) ~
604− ?: (mark-has-ref p.result) ~
605− `result
606−::
607++ read-mark
118++ read-mark
608 |= [name=term cor=type]
119 |= [name=term cor=type]
609 ^- (each imported @t)
120 ^- (each imported @t)
@@ -614,50 +125,8 @@
614 =/ sample=type p.p.cor
125 =/ sample=type p.p.cor
615 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
126 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
616 =/ result (read-with name name raw [~ q.p.cor])
127 =/ result (read-with name name raw [~ q.p.cor])
617− ?: ?=([%& *] result) result
128+ ?. ?=([%& *] result) result
618− =/ fallback=(each (unit (each imported @t)) tang)
129+ result
619− (mule |.((mark-union-fallback raw q.p.cor)))
620− ?: ?=(%| -.fallback) result
621− ?~ p.fallback result
622− u.p.fallback
623−::
624−++ read-named-diagnostic
625− |= [module=term name=term cor=type]
626− ^- import-diagnostic
627− =/ result=(each imported @t) (read-named module name cor)
628− ?: ?=(%& -.result) [%ok p.result]
629− ?. ?=([%core *] cor) [%unsupported p.result]
630− ?: =(cor -:!>(..zuse)) [%unsupported p.result]
631− ?. (scope-safe cor %$) [%unsupported p.result]
632− =/ chapters=(map term tome) q.r.q.cor
633− ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
634− [%unsupported p.result]
635− =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
636− ?. ?=(%& -.selected) [%unsupported p.result]
637− =/ overlap=(each ? tang) (mule |.((overlap-source-witness module name cor)))
638− ?: &(?=(%& -.overlap) p.overlap) [%invalid %overlap 'Hoon union cases overlap']
639− =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
640− ?. ?=(%& -.again) [%unsupported p.result]
641− =/ evidence=(unit import-diagnostic) (first-invalid p.again)
642− ?~ evidence [%unsupported p.result]
643− u.evidence
644−::
645−++ read-mark-diagnostic
646− |= [name=term cor=type]
647− ^- import-diagnostic
648− =/ result=(each imported @t) (read-mark name cor)
649− ?: ?=(%& -.result) [%ok p.result]
650− ?. ?=([%core *] cor) [%unsupported p.result]
651− ?. ?=([%cell *] p.cor) [%unsupported p.result]
652− ?. =(p.cor q.q.cor) [%unsupported p.result]
653− ?. (scope-safe q.p.cor %$) [%unsupported p.result]
654− =/ sample=type p.p.cor
655− =/ raw=type ?:(?=([%face *] sample) q.sample sample)
656− =/ again=(each imported tang) (mule |.((walk name raw catalog ~ [~ q.p.cor])))
657− ?. ?=(%& -.again) [%unsupported p.result]
658− =/ evidence=(unit import-diagnostic) (first-invalid p.again)
659− ?~ evidence [%unsupported p.result]
660− u.evidence
661::
130::
662++ read-with
131++ read-with
663 |= [module=term name=term typ=type context=(unit type)]
132 |= [module=term name=term typ=type context=(unit type)]
@@ -917,8 +386,9 @@
917 ?: ?=([%bckt ^ ^] h) &
386 ?: ?=([%bckt ^ ^] h) &
918 |($(h -.h) $(h +.h))
387 |($(h -.h) $(h +.h))
919::
388::
920−:: The Grammar's disjointness rule applies to imported $% and $? too;
389+:: (doc question 22) The Grammar's disjointness rule is applied to
921−:: @iko confirmed the rule for imported unions on 2026-10-30.
390+:: imported $% and $? too. The import table singles out $^, so @iko
391+:: has been asked whether that general rule also covers those unions.
922++ has-spec-general-union
392++ has-spec-general-union
923 |= h=*
393 |= h=*
924 ^- ?
394 ^- ?
@@ -1076,8 +546,8 @@
1076 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
546 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
1077 [%| 'a Hoon union needs a source-level disjointness check']
547 [%| 'a Hoon union needs a source-level disjointness check']
1078 ?. (disjoint a b)
548 ?. (disjoint a b)
1079− ?: ?=([%fits *] p.h) [%| 'Hoon union disjointness could not be verified']
549+ ?: ?=([%fits *] p.h) [%| 'a Hoon union has overlapping cases']
1080− [%| 'Hoon $^ union disjointness could not be verified']
550+ [%| 'a Hoon $^ union has overlapping cases']
1081 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
551 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
1082 ==
552 ==
1083++ union-cases
553++ union-cases
@@ -1098,8 +568,6 @@
1098 ^- ?
568 ^- ?
1099 ?: ?=([%face *] a) $(a body.a)
569 ?: ?=([%face *] a) $(a body.a)
1100 ?: ?=([%face *] b) $(b body.b)
570 ?: ?=([%face *] b) $(b body.b)
1101− ?: ?=([%named *] a) $(a body.a)
1102− ?: ?=([%named *] b) $(b body.b)
1103 ?: ?=([%fork *] a)
571 ?: ?=([%fork *] a)
1104 (levy cases.a |=(item=imported (disjoint item b)))
572 (levy cases.a |=(item=imported (disjoint item b)))
1105 ?: ?=([%fork *] b)
573 ?: ?=([%fork *] b)
@@ -1154,32 +622,6 @@
1154 ?. (arm-map-valid +.chapter) ~
622 ?. (arm-map-valid +.chapter) ~
1155 [~ (arm-map-has +.chapter target)]
623 [~ (arm-map-has +.chapter target)]
1156::
624::
1157−:: Return a unique source arm from either validated tome wrapper. Walk
1158−:: the noun map rather than relying on fields that differ on Clay.
1159−++ arm-map-sources
1160− |= [m=* target=term]
1161− ^- (list hoon)
1162− ?@ m ~
1163− =/ kv=* -.m
1164− =/ children=* +.m
1165− =/ found=(list hoon) ?:(=(-.kv target) ~[;;(hoon +.kv)] ~)
1166− (weld found (weld $(m -.children) $(m +.children)))
1167−::
1168−++ chapter-source
1169− |= [chapter=* target=term]
1170− ^- (unit hoon)
1171− ?: (arm-map-valid chapter) (unique-arm-source chapter target)
1172− ?@ chapter ~
1173− ?. (arm-map-valid +.chapter) ~
1174− (unique-arm-source +.chapter target)
1175−::
1176−++ unique-arm-source
1177− |= [arms=* target=term]
1178− ^- (unit hoon)
1179− =/ sources=(list hoon) (arm-map-sources arms target)
1180− ?. ?=([* ~] sources) ~
1181− `i.sources
1182−::
1183++ chapter-unsafe
625++ chapter-unsafe
1184 |= [chapter=* target=term]
626 |= [chapter=* target=term]
1185 ^- ?
627 ^- ?
@@ -1222,46 +664,17 @@
1222 ?@ src |
664 ?@ src |
1223 |($(src -.src) $(src +.src))
665 |($(src -.src) $(src +.src))
1224::
666::
1225−:: Clay can wrap each call component in source-location metadata.
1226−:: Peel only those wrappers; malformed casts are trapped by +mop-specs.
1227−++ mop-source-code
1228− |= code=hoon
1229− ^- hoon
1230− =/ plain=(unit *) (source-unwrap code 4)
1231− ?~ plain !!
1232− ;;(hoon u.plain)
1233−::
1234−++ source-single-wing
1235− |= raw=*
1236− ^- (unit term)
1237− =/ plain=(unit *) (source-unwrap raw 4)
1238− ?~ plain ~
1239− ?. ?=([%wing [@ ~]] u.plain) ~
1240− `;;(term -.+.u.plain)
1241−::
1242++ mop-specs-raw
667++ mop-specs-raw
1243 |= body=hoon
668 |= body=hoon
1244 ^- (unit [key=spec value=spec])
669 ^- (unit [key=spec value=spec])
1245− =. body (mop-source-code body)
1246 ?. ?=([%cncl *] body) ~
670 ?. ?=([%cncl *] body) ~
1247 ?. ?=([%tsgr *] p.body) ~
671 ?. ?=([%tsgr *] p.body) ~
1248− =/ b=hoon (mop-source-code q.p.body)
672+ =/ b=hoon q.p.body
1249 ?. ?=([%cncl *] b) ~
673 ?. ?=([%cncl *] b) ~
1250− =/ call=hoon (mop-source-code p.b)
1251− ?. ?=([%cncl *] call) ~
674+ ?. ?=([%cncl *] p.b) ~
1252− =/ w=(unit term) (source-single-wing p.call)
675+ ?. ?=([%wing *] p.p.b) ~
1253− ?~ w ~
1254− ?. =(u.w %mop) ~
676+ ?. =(p.p.p.b ~[%mop]) ~
1255− =/ raw=* q.call
677+ =/ specs=(list spec) ;;((list spec) q.p.b)
1256− =/ wings=(unit [key=spec value=spec])
1257− ?. ?=([* [* ~]] raw) ~
1258− =/ a=(unit term) (source-single-wing -.raw)
1259− =/ b=(unit term) (source-single-wing -.+.raw)
1260− ?~ a ~
1261− ?~ b ~
1262− [~ [[%like ~[u.a] ~] [%like ~[u.b] ~]]]
1263− ?^ wings wings
1264− =/ specs=(list spec) ;;((list spec) raw)
1265 ?. ?=([* [* ~]] specs) ~
678 ?. ?=([* [* ~]] specs) ~
1266 [~ [i.specs i.t.specs]]
679 [~ [i.specs i.t.specs]]
1267::
680::
@@ -1458,7 +871,7 @@
1458 =/ err (first-bads cases)
871 =/ err (first-bads cases)
1459 ?^ err [%bad u.err]
872 ?^ err [%bad u.err]
1460 ?. (all-disjoint cases)
873 ?. (all-disjoint cases)
1461− [%bad ?:(is-cell 'Hoon $^ union disjointness could not be verified' 'Hoon union disjointness could not be verified')]
874+ [%bad ?:(is-cell 'a Hoon $^ union has overlapping cases' 'a Hoon union has overlapping cases')]
1462 =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
875 =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
1463 =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
876 =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
1464 ?. ?=([%& *] attempt) [%bad unsupported]
877 ?. ?=([%& *] attempt) [%bad unsupported]
@@ -1471,49 +884,6 @@
1471 ?~ args [%bad unsupported]
884 ?~ args [%bad unsupported]
1472 [%apply name.out u.args]
885 [%apply name.out u.args]
1473::
886::
1474−:: A nested named tagged union may be recovered only if its hold is
1475−:: exactly the selected arm of this core. Provenance and all original
1476−:: source cases are checked by the same fallback as a top-level arm.
1477−++ nested-tagged-union
1478− |= [module=term typ=type context=(unit type)]
1479− ^- (unit imported)
1480− ?~ context ~
1481− ?. ?=([%core *] u.context) ~
1482− ?. ?=([%hold *] typ) ~
1483− =/ n=(unit term) (hold-name q.typ)
1484− ?~ n ~
1485− :: The outer proof has a shared budget. Bound each nested re-proof as
1486− :: well, so rebuilding a shared source DAG cannot grow without limit.
1487− =/ source=(unit hoon) (local-arm-source u.context u.n)
1488− ?~ source ~
1489− =/ cases=(unit (list tagged-case)) (tagged-source-code u.source u.n)
1490− ?~ cases ~
1491− ?. (safe-source-tagged u.cases u.context ~[u.n] 256) ~
1492− =/ selected=(each type tang)
1493− (mule |.((~(play ut u.context) (ream (cat 3 '*' u.n)))))
1494− ?. ?=([%& *] selected) ~
1495− ?. =(p.selected typ) ~
1496− =/ attempt=(each (unit (each imported @t)) tang)
1497− (mule |.((tagged-union-fallback module u.n u.context)))
1498− ?. ?=([%& *] attempt) ~
1499− ?~ p.attempt ~
1500− ?. ?=([%& [%fork *]] u.p.attempt) ~
1501− `p.u.p.attempt
1502−::
1503−:: Keep the proven owner boundary when a nested union refers to itself.
1504−++ contains-named-ref
1505− |= [node=imported module=term name=term]
1506− ^- ?
1507− ?- node
1508− [%ref *] &(=(module module.node) =(name name.node))
1509− [%named *] |
1510− [%face *] $(node body.node)
1511− [%cell *] |($(node head.node) $(node tail.node))
1512− [%fork *] (lien cases.node |=(child=imported (contains-named-ref child module name)))
1513− [%apply *] (lien args.node |=(child=imported (contains-named-ref child module name)))
1514− * |
1515− ==
1516−::
1517++ walk
887++ walk
1518 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
888 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
1519 ^- imported
889 ^- imported
@@ -1522,10 +892,10 @@
1522 %void [%void ~]
892 %void [%void ~]
1523 [%atom *]
893 [%atom *]
1524 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
894 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
1525− [%invalid %aura 'signed and float auras cannot be imported']
895+ [%bad 'signed and float auras cannot be imported']
1526 [%atom p.typ q.typ]
896 [%atom p.typ q.typ]
1527 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
897 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
1528− [%core *] [%invalid %core 'cores and gates cannot be imported']
898+ [%core *] [%bad 'cores and gates cannot be imported']
1529 [%face *]
899 [%face *]
1530 ?@ p.typ [%face p.typ $(typ q.typ)]
900 ?@ p.typ [%face p.typ $(typ q.typ)]
1531 [%bad 'a complex Hoon face needs translation']
901 [%bad 'a complex Hoon face needs translation']
@@ -1534,23 +904,10 @@
1534 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
904 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
1535 =/ err (first-bads cases)
905 =/ err (first-bads cases)
1536 ?^ err [%bad u.err]
906 ?^ err [%bad u.err]
1537− ?. (all-disjoint cases) [%bad 'Hoon union disjointness could not be verified']
907+ ?. (all-disjoint cases) [%bad 'a Hoon union has overlapping cases']
1538 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
908 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
1539 [%hint *] $(typ q.typ)
909 [%hint *] $(typ q.typ)
1540 [%hold *]
910 [%hold *]
1541− =/ prior=(unit (unit term)) (find-seen typ seen)
1542− ?^ prior
1543− ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
1544− =/ origin (ref-origin module u.u.prior typ context)
1545− ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
1546− [%ref u.origin u.u.prior]
1547− =/ nested=(unit imported) (nested-tagged-union module typ context)
1548− ?^ nested
1549− ?: ?=(~ seen) u.nested
1550− =/ name=(unit term) (hold-name q.typ)
1551− ?~ name u.nested
1552− ?. (contains-named-ref u.nested module u.name) u.nested
1553− [%named module u.name u.nested]
1554 ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
911 ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
1555 =/ nm (hold-name q.typ)
912 =/ nm (hold-name q.typ)
1556 (collection-union typ module sig [[typ nm] seen] context)
913 (collection-union typ module sig [[typ nm] seen] context)
@@ -1567,8 +924,14 @@
1567 =/ second=type (~(play ut p.typ) (ream '*value'))
924 =/ second=type (~(play ut p.typ) (ream '*value'))
1568 [%apply name ~[first-import $(typ second)]]
925 [%apply name ~[first-import $(typ second)]]
1569 [%apply name ~[first-import]]
926 [%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]
1570 =/ nm (hold-name q.typ)
933 =/ nm (hold-name q.typ)
1571− ?: =(nm [~ %vase]) [%bad 'a Hoon type named vase needs source provenance']
934+ ?: =(nm [~ %vase]) [%bad 'vases cannot be imported']
1572 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
935 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
1573 [%bad 'Hoon collection provenance is unavailable or shadowed']
936 [%bad 'Hoon collection provenance is unavailable or shadowed']
1574 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
937 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
@@ -1577,8 +940,7 @@
1577 [%bad 'Hoon collection provenance is unavailable or shadowed']
940 [%bad 'Hoon collection provenance is unavailable or shadowed']
1578 =/ mop (mop-arguments typ)
941 =/ mop (mop-arguments typ)
1579 ?^ mop
942 ?^ mop
1580− :: An exact revisit fails closed without guessing a name.
1581− [%apply %mop ~[$(typ key.u.mop, seen [[typ ~] seen]) $(typ value.u.mop, seen [[typ ~] seen])]]
943+ [%apply %mop ~[$(typ key.u.mop) $(typ value.u.mop)]]
1582 ?: (source-uses q.typ %mop)
944 ?: (source-uses q.typ %mop)
1583 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
945 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
1584 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
946 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
@@ -1613,7 +975,7 @@
1613 ?^ err [%bad u.err]
975 ?^ err [%bad u.err]
1614 ?: (disjoint first second)
976 ?: (disjoint first second)
1615 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
977 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
1616− [%bad 'Hoon $^ union disjointness could not be verified']
978+ [%bad 'a Hoon $^ union has overlapping cases']
1617 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
979 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
1618 =/ cannot=@t
980 =/ cannot=@t
1619 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
981 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
@@ -1670,9 +1032,7 @@
1670 [%atom *] ~
1032 [%atom *] ~
1671 [%ref *] ~
1033 [%ref *] ~
1672 [%bad *] [~ reason.out]
1034 [%bad *] [~ reason.out]
1673− [%invalid *] [~ reason.out]
1674 [%face *] $(out body.out)
1035 [%face *] $(out body.out)
1675− [%named *] $(out body.out)
1676 [%cell *]
1036 [%cell *]
1677 =/ err $(out head.out)
1037 =/ err $(out head.out)
1678 ?~ err $(out tail.out)
1038 ?~ err $(out tail.out)
@@ -1688,35 +1048,6 @@
1688 =/ err (first-bad i.xs)
1048 =/ err (first-bad i.xs)
1689 ?~ err $(xs t.xs)
1049 ?~ err $(xs t.xs)
1690 err
1050 err
1691−::
1692−++ first-invalid
1693− |= out=imported
1694− ^- (unit import-diagnostic)
1695− ?- out
1696− [%noun *] ~
1697− [%void *] ~
1698− [%atom *] ~
1699− [%ref *] ~
1700− [%bad *] `[%unsupported reason.out]
1701− [%invalid *] `[%invalid code.out reason.out]
1702− [%face *] $(out body.out)
1703− [%named *] $(out body.out)
1704− [%cell *]
1705− =/ first $(out head.out)
1706− ?~ first $(out tail.out)
1707− first
1708− [%fork *] (first-invalids cases.out)
1709− [%apply *] (first-invalids args.out)
1710− ==
1711−::
1712−++ first-invalids
1713− |= xs=(list imported)
1714− ^- (unit import-diagnostic)
1715− ?~ xs ~
1716− =/ first (first-invalid i.xs)
1717− ?~ first $(xs t.xs)
1718− first
1719−::
1720:: +fixture-test: shared golden expectations for eval and the ship.
1051:: +fixture-test: shared golden expectations for eval and the ship.
1721:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
1052:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
1722:: that a failed branch probe is reported rather than crashing the host.
1053:: that a failed branch probe is reported rather than crashing the host.
@@ -1812,7 +1143,7 @@
1812 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1143 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1813 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1144 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1814 ['disjoint cell union' errors]
1145 ['disjoint cell union' errors]
1815− =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
1146+ =/ errors ?: =((sample %invalid-cell) [%| 'a Hoon $^ union has overlapping cases']) errors
1816 ['overlapping cell union is rejected' errors]
1147 ['overlapping cell union is rejected' errors]
1817 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1148 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1818 ['local mop shadow in a field is rejected' errors]
1149 ['local mop shadow in a field is rejected' errors]
@@ -1853,11 +1184,9 @@
1853 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1184 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1854 [%face *] "{(trip name.out)}={(show-import body.out)}"
1185 [%face *] "{(trip name.out)}={(show-import body.out)}"
1855 [%fork *] "(union {(show-imports cases.out)})"
1186 [%fork *] "(union {(show-imports cases.out)})"
1856− [%named *] "(named {(trip name.out)}.{(trip module.out)} {(show-import body.out)})"
1857 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1187 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1858 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1188 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1859 [%bad *] "error: {(trip reason.out)}"
1189 [%bad *] "error: {(trip reason.out)}"
1860− [%invalid *] "error: {(trip reason.out)}"
1861 ==
1190 ==
1862::
1191::
1863++ show-imports
1192++ show-imports
@@ -1875,15 +1204,6 @@
1875 [%| *] "error: {(trip p.result)}"
1204 [%| *] "error: {(trip p.result)}"
1876 ==
1205 ==
1877::
1206::
1878−++ show-import-diagnostic
1879− |= result=import-diagnostic
1880− ^- tape
1881− ?- result
1882− [%ok *] (show-import value.result)
1883− [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1884− [%unsupported *] "unsupported: {(trip message.result)}"
1885− ==
1886−::
1887:: Clay includes debug spans around source nodes. Reproduce that
1207:: Clay includes debug spans around source nodes. Reproduce that
1888:: shape without Clay so the same regression runs under eval and -test.
1208:: shape without Clay so the same regression runs under eval and -test.
1889++ decorate-union-source
1209++ decorate-union-source
@@ -1907,67 +1227,6 @@
1907 =/ source=hoon original(q.p (decorate-union-source q.p.original))
1227 =/ source=hoon original(q.p (decorate-union-source q.p.original))
1908 (read-mold %small name typ(q source))
1228 (read-mold %small name typ(q source))
1909::
1229::
1910−:: Test debug metadata at the spec boundary without assuming that the
1911−:: eval version of Hoon's spec mold itself includes Clay's %dbug tag.
1912−++ debug-spec-fixture
1913− ^- tape
1914− =/ location=* [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1915− =/ wrapped=* [%dbug location [%leaf %tas %x]]
1916− =/ got=(unit *) (source-gist-tail wrapped)
1917− ?~ got "debug wrapper missing"
1918− =/ leaf=(each spec tang) (mule |.(;;(spec u.got)))
1919− ?. ?=([%& [%leaf %tas %x]] leaf) "debug leaf not recovered"
1920− =/ branch=spec [%bccl ~[p.leaf [%base [%atom %t]]]]
1921− ?^ (tagged-cases ~[branch branch] ~) "duplicate tags accepted"
1922− =/ broken=(unit *) (source-gist-tail [%dbug location 42])
1923− ?~ broken "debug wrapper missing"
1924− =/ invalid=(each spec tang) (mule |.(;;(spec u.broken)))
1925− ?: ?=(%& -.invalid) "malformed spec accepted"
1926− "valid wrapper; duplicate and malformed rejected"
1927−::
1928−:: The same named-operand call with Clay-style source-location wrappers.
1929−++ debug-mop-fixture
1930− |= cor=type
1931− ^- tape
1932− =/ typ=type (~(play ut cor) (ream '*mop-wing-valid'))
1933− ?> ?=([%hold *] typ)
1934− =/ original=hoon q.typ
1935− ?> ?=([%tsls [%note * *] *] original)
1936− =/ body=hoon q.p.original
1937− ?> ?=([%cncl *] body)
1938− ?> ?=([%tsgr *] p.body)
1939− =/ b=hoon q.p.body
1940− ?> ?=([%cncl *] b)
1941− =/ call=hoon p.b
1942− ?> ?=([%cncl *] call)
1943− ?> ?=([* [* ~]] q.call)
1944− =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1945− =/ inner=hoon call(p [%dbug at p.call], q ~[[%dbug at i.q.call] [%dbug at i.t.q.call]])
1946− =/ outer=hoon body(p p.body(q b(p [%dbug at inner])))
1947− =/ mixed=hoon body(p p.body(q b(p inner)))
1948− =/ multi=hoon body(p p.body(q b(p call(p [%dbug at [%wing ~[%one %two]]]))))
1949− =/ plain=(unit [key=spec value=spec]) (mop-specs body)
1950− ?~ plain "unwrapped mop not recognized"
1951− ?. =((mop-specs [%dbug at outer]) plain) "wrapped mop not recognized"
1952− ?. =((mop-specs mixed) plain) "mixed mop not recognized"
1953− ?^ (mop-specs multi) "multi-segment callee accepted"
1954− ?^ (mop-specs [%dbug at [%sand %ud 42]]) "malformed call accepted"
1955− ?^ (source-single-wing [%dbug at 42]) "malformed wing accepted"
1956− ?^ (source-single-wing [%dbug at [%wing ~[%one %two]]]) "multi-segment operand accepted"
1957− =/ four=* [%dbug at [%dbug at [%dbug at [%dbug at [%wing ~[%mop]]]]]]
1958− =/ five=* [%dbug at four]
1959− ?~ (source-single-wing four) "four wrappers rejected"
1960− ?^ (source-single-wing five) "wrapper limit exceeded"
1961− ?~ (source-note-unwrap four 4) "four note wrappers rejected"
1962− ?^ (source-note-unwrap five 4) "note wrapper limit exceeded"
1963− =/ selected=(unit hoon) (local-arm-source cor %tag-valid)
1964− ?~ selected "selected union not found"
1965− =/ arm-four=hoon [%dbug at [%dbug at [%dbug at [%dbug at u.selected]]]]
1966− =/ arm-five=hoon [%dbug at arm-four]
1967− ?~ (tagged-source-code arm-four %tag-valid) "four wrapped selected arms rejected"
1968− ?^ (tagged-source-code arm-five %tag-valid) "selected arm wrapper limit exceeded"
1969− "wrapped and mixed calls accepted; malformed, multi-segment and excessive wrappers rejected"
1970−::
1971:: Synthetic nodes test each part of the direct collection-call proof.
1230:: Synthetic nodes test each part of the direct collection-call proof.
1972++ collection-wrapper-fixture
1231++ collection-wrapper-fixture
1973 ^- tape
1232 ^- tape
@@ -2013,23 +1272,6 @@
2013 =/ mark-rec-core=type -:(ride fp mark-rec)
1272 =/ mark-rec-core=type -:(ride fp mark-rec)
2014 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
1273 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
2015 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1274 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
2016− =/ make-mark
2017− |= [field=@t scope=type]
2018− ^- type
2019− -:(ride scope (crip "|_ a={(trip field)}\0a++ grab |% ++ noun a --\0a++ grow |% ++ noun a --\0a++ grad %noun\0a--\0a"))
2020− =/ mark-union-core=type (make-mark 'mark-flag-valid:small' fp)
2021− =/ mark-overlap-core=type (make-mark 'mark-flag-overlap:small' fp)
2022− =/ mark-hidden-core=type (make-mark 'mark-flag-hidden:small' fp)
2023− =/ mark-signed-core=type (make-mark 'signed:small' fp)
2024− =/ mark-callable-core=type (make-mark 'gate-test:small' fp)
2025− =/ extra-subject=type [%cell [%face %other other] fp]
2026− =/ mark-extra-core=type (make-mark 'mark-flag-valid:small' extra-subject)
2027− =/ other-hold=type (~(play ut other) (ream '*chain'))
2028− =/ recursive-hold=type (~(play ut sc) (ream '*chain'))
2029− =/ fake-vase=type -:(ride -:!>(..zuse) '|%\0a+$ vase @ud\0a--\0a')
2030− =/ spoof=(unit import-diagnostic)
2031− (first-invalid [%bad 'signed and float auras cannot be imported'])
2032− ?> ?=(^ spoof)
2033 =/ mark-shadow-core=type -:(ride sp mark-basic)
1275 =/ mark-shadow-core=type -:(ride sp mark-basic)
2034 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
1276 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
2035 =/ tshc=type -:(ride tshp only-list)
1277 =/ tshc=type -:(ride tshp only-list)
@@ -2040,30 +1282,6 @@
2040 =/ distinct=type -:(ride distinct-parent origin-first)
1282 =/ distinct=type -:(ride distinct-parent origin-first)
2041 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
1283 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
2042 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1284 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
2043− =/ tag-child=@t
2044− '|%\0a+$ tag-invalid-cell @t\0a+$ choice $%([%ok a=tag-invalid-cell] [%err a=@ud])\0a--\0a'
2045− =/ tag-collision=type -:(ride [%cell [%face %base sc] -:!>(..zuse)] tag-child)
2046− =/ tag-clean=type -:(ride [%cell [%face %base other] -:!>(..zuse)] tag-child)
2047− =/ tag-zuse=@t
2048− '|%\0a+$ ship @t\0a+$ path @ud\0a+$ choice $%([%ok who=ship] [%err where=path])\0a--\0a'
2049− =/ tag-zuse-core=type -:(ride -:!>(..zuse) tag-zuse)
2050− =/ nest-parent-src=@t
2051− '|%\0a+$ tag-nest-inner $%([%foreign @t] [%foreign @t])\0a--\0a'
2052− =/ nest-parent=type -:(ride -:!>(..zuse) nest-parent-src)
2053− =/ nest-child-src=@t
2054− '|%\0a+$ tag-nest-inner $%([%left @t] [%right @ud])\0a+$ tag-nest-middle $%([%one x=tag-nest-inner] [%two ~])\0a--\0a'
2055− =/ nest-collision=type -:(ride [%cell [%face %base nest-parent] -:!>(..zuse)] nest-child-src)
2056− =/ self-parent=type
2057− -:(ride -:!>(..zuse) '|%\0a+$ tag-self ?(%same %same)\0a--\0a')
2058− =/ self-child=@t
2059− '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@t])\0a--\0a'
2060− =/ self-collision=type -:(ride [%cell [%face %tag-self self-parent] -:!>(..zuse)] self-child)
2061− =/ self-other=type
2062− -:(ride -:!>(..zuse) '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@ud])\0a--\0a')
2063− =/ mop-ford-parent=type
2064− -:(ride -:!>(..zuse) '|%\0a+$ value ?(%same %same)\0a--\0a')
2065− =/ mop-ford-child=type
2066− -:(ride [%cell [%face %value mop-ford-parent] -:!>(..zuse)] '|%\0a+$ key @ud\0a+$ value @t\0a+$ mm ((mop key value) lte)\0a--\0a')
2067 =/ sample
1285 =/ sample
2068 |= name=term
1286 |= name=term
2069 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
1287 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -2101,15 +1319,6 @@
2101 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
1319 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
2102 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
1320 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
2103 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1321 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
2104− (crip "mark-flag-source: {(show-result (read-named %small %mark-flag-valid sc))}")
2105− (crip "mark-flag-union: {(show-result (read-mark %flag-union mark-union-core))}")
2106− (crip "mark-flag-overlap: {(show-result (read-mark %flag-overlap mark-overlap-core))}")
2107− (crip "mark-flag-hidden: {(show-result (read-mark %flag-hidden mark-hidden-core))}")
2108− (crip "mark-flag-signed: {(show-result (read-mark %flag-signed mark-signed-core))}")
2109− (crip "mark-flag-callable: {(show-result (read-mark %flag-callable mark-callable-core))}")
2110− (crip "mark-flag-extra: {(show-result (read-mark %flag-extra mark-extra-core))}")
2111− (crip "mark-flag-other-hold: {?~((mark-union-fallback other-hold fp) "unsupported" "BAD")}")
2112− (crip "mark-flag-recursive-fallback: {?~((mark-union-fallback recursive-hold fp) "unsupported" "BAD")}")
2113 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
1322 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
2114 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
1323 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
2115 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
1324 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
@@ -2134,22 +1343,11 @@
2134 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
1343 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
2135 (crip "named-mop: {(show-result (sample %named-mop))}")
1344 (crip "named-mop: {(show-result (sample %named-mop))}")
2136 (crip "mop-list: {(show-result (sample %mop-list))}")
1345 (crip "mop-list: {(show-result (sample %mop-list))}")
2137− (crip "mop-wing-valid: {(show-result (sample %mop-wing-valid))}")
2138− (crip "mop-wing-invalid-key: {(show-result (sample %mop-wing-invalid-key))}")
2139− (crip "mop-wing-invalid-key-alias: {(show-result (sample %mop-wing-invalid-key-alias))}")
2140− (crip "mop-wing-invalid-value: {(show-result (sample %mop-wing-invalid-value))}")
2141− (crip "mop-wing-invalid-value-alias: {(show-result (sample %mop-wing-invalid-value-alias))}")
2142− (crip "mop-wing-rec-key: {(show-result (sample %mop-wing-rec-key))}")
2143− (crip "mop-wing-rec-value: {(show-result (sample %mop-wing-rec-value))}")
2144− (crip "mop-wing-shadow: {(show-result (read-named %shadow %mmw hc))}")
2145− (crip "mop-wing-ford-collision: {(show-result (read-named %child %mm mop-ford-child))}")
2146− (crip "mop-wing-debug: {(debug-mop-fixture sc)}")
2147 (crip "signed: {(show-result (sample %signed))}")
1346 (crip "signed: {(show-result (sample %signed))}")
2148 (crip "float: {(show-result (sample %float))}")
1347 (crip "float: {(show-result (sample %float))}")
2149 (crip "gate: {(show-result (sample %gate-test))}")
1348 (crip "gate: {(show-result (sample %gate-test))}")
2150 (crip "vase: {(show-result vase)}")
1349 (crip "vase: {(show-result vase)}")
2151 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1350 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
2152− (crip "debug-spec: {debug-spec-fixture}")
2153 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1351 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
2154 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1352 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
2155 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
1353 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
@@ -2233,69 +1431,9 @@
2233 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
1431 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
2234 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
1432 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
2235 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
1433 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
2236− (crip "diagnostic-items: {(show-import-diagnostic (read-named-diagnostic %small %items sc))}")
2237− (crip "diagnostic-signed: {(show-import-diagnostic (read-named-diagnostic %small %signed sc))}")
2238− (crip "diagnostic-float: {(show-import-diagnostic (read-named-diagnostic %small %float sc))}")
2239− (crip "diagnostic-overlap: {(show-import-diagnostic (read-named-diagnostic %small %explicit-percent-overlap sc))}")
2240− (crip "diagnostic-unproved: {(show-import-diagnostic (read-named-diagnostic %small %list-nested-invalid-cell sc))}")
2241− (crip "diagnostic-mark-gate: {(show-import-diagnostic (read-mark-diagnostic %bad mark-gate-core))}")
2242− (crip "diagnostic-shadow-vase: {(show-import-diagnostic (read-named-diagnostic %fake %vase fake-vase))}")
2243− (crip "diagnostic-spoof: {(show-import-diagnostic u.spoof)}")
2244 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
1434 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
2245 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
1435 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
2246 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
1436 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
2247− (crip "tag-ford-collision: {(show-result (read-named %child %choice tag-collision))}")
2248− (crip "tag-ford-clean: {(show-result (read-named %child %choice tag-clean))}")
2249− (crip "tag-zuse-local: {(show-result (read-named %child %choice tag-zuse-core))}")
2250− (crip "tag-nest-inner: {(show-result (sample %tag-nest-inner))}")
2251− (crip "tag-nest-middle: {(show-result (sample %tag-nest-middle))}")
2252− (crip "tag-nest-diamond: {(show-result (sample %tag-nest-diamond))}")
2253− (crip "tag-nest-deep: {(show-result (sample %tag-nest-deep))}")
2254− (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2255− (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2256− (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2257− (crip "tag-nest-rec-list: {(show-result (sample %tag-nest-rec-list-outer))}")
2258− (crip "tag-nest-rec-repeat: {(show-result (sample %tag-nest-rec-repeat))}")
2259− (crip "tag-nest-rec-duplicate: {(show-result (sample %tag-nest-rec-bad-outer))}")
2260− (crip "tag-nest-rec-hidden: {(show-result (sample %tag-nest-rec-hidden-outer))}")
2261− (crip "tag-nest-rec-mutual: {(show-result (sample %tag-nest-rec-mutual-outer))}")
2262− (crip "tag-nest-rec-outer-overlap: {(show-result (sample %tag-nest-rec-outer-overlap))}")
2263− (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")}")
2264− (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2265− (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2266− (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
2267− (crip "tag-nest-ford-collision: {(show-result (read-named %outer %tag-nest-middle nest-collision))}")
2268− (crip "tag-self: {(show-result (sample %tag-self))}")
2269− (crip "tag-self-tail: {(show-result (sample %tag-self-tail))}")
2270− (crip "tag-self-duplicate: {(show-result (sample %tag-self-duplicate))}")
2271− (crip "tag-self-hidden: {(show-result (sample %tag-self-hidden))}")
2272− (crip "tag-self-indirect: {(show-result (sample %tag-self-indirect))}")
2273− (crip "tag-mutual-a: {(show-result (sample %tag-mutual-a))}")
2274− (crip "tag-mutual-b: {(show-result (sample %tag-mutual-b))}")
2275− (crip "tag-self-pair: {(show-result (sample %tag-self-pair))}")
2276− (crip "tag-self-ford-collision: {(show-result (read-named %child %tag-self self-collision))}")
2277− (crip "tag-self-wrong-core: {(show-result (read-mold-in %other %tag-self (~(play ut sc) (ream '*tag-self')) self-other))}")
2278− (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")}")
2279− (crip "tag-null-good: {(show-result (sample %tag-null-good))}")
2280− (crip "tag-null-duplicate: {(show-result (sample %tag-null-duplicate))}")
2281− (crip "tag-null-hidden: {(show-result (sample %tag-null-hidden))}")
2282− (crip "tag-valid: {(show-result (sample %tag-valid))}")
2283− (crip "tag-duplicate: {(show-result (sample %tag-duplicate))}")
2284− (crip "tag-collapsed: {(show-result (sample %tag-collapsed))}")
2285− (crip "tag-invalid-direct: {(show-result (sample %tag-invalid-direct))}")
2286− (crip "tag-invalid-alias: {(show-result (sample %tag-invalid-alias))}")
2287− (crip "tag-invalid-list: {(show-result (sample %tag-invalid-list))}")
2288− (crip "tag-enum-good: {(show-result (sample %tag-enum-good))}")
2289− (crip "tag-enum-bad: {(show-result (sample %tag-enum-bad))}")
2290− (crip "tag-nested-good: {(show-result (sample %tag-nested-good))}")
2291− (crip "tag-shadow-jar: {(show-result (read-named %shadow-static %tag-shadow-jar xc))}")
2292− (crip "tag-shadow-jug: {(show-result (read-named %shadow-static %tag-shadow-jug xc))}")
2293− (crip "tag-fuel-small: {?:(?=(^ (safe-source-name %tag-fuel-2 sc ~ 64)) "yes" "no")}")
2294− (crip "tag-fuel-large: {?:(?=(~ (safe-source-name %tag-fuel-11 sc ~ 64)) "rejected" "wrong")}")
2295− (crip "presence-action-1: {(show-result (present %action-1))}")
2296− (crip "presence-command-1: {(show-result (present %command-1))}")
2297− (crip "presence-update-1: {(show-result (present %update-1))}")
2298− (crip "presence-response-1: {(show-result (present %response-1))}")
2299 (crip "presence-topic: {(show-result (present %topic))}")
1437 (crip "presence-topic: {(show-result (present %topic))}")
2300 (crip "presence-timing: {(show-result (present %timing))}")
1438 (crip "presence-timing: {(show-result (present %timing))}")
2301 (crip "presence-places: {(show-result (present %places))}")
1439 (crip "presence-places: {(show-result (present %places))}")
jibb-dev/lib/jibb.hoon+188−5119
@@ -874,7 +874,7 @@
874 %'~[' %'|=(' %'$-(' :: openers
874 %'~[' %'|=(' %'$-(' :: openers
875 %'%/' %'/' :: paths
875 %'%/' %'/' :: paths
876 %'+' %'`' %'=' :: pair, unit, face
876 %'+' %'`' %'=' :: pair, unit, face
877− %'*' %'?' %'_' :: noun, loobean, type hole
877+ %'*' %'?' :: noun, loobean mold
878 %'++' %'+$' %'|=' %'|$' :: runes
878 %'++' %'+$' %'|=' %'|$' :: runes
879 %'^-' %'~&' %'?-' %'!!' :: runes
879 %'^-' %'~&' %'?-' %'!!' :: runes
880 %'/-' %'/%' %'/=' :: imports
880 %'/-' %'/%' %'/=' :: imports
@@ -1016,7 +1016,6 @@
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 ~] :: _
1020 [%path at=span segs=(list pseg)] :: / /todos /todo/[id=@ud]
1019 [%path at=span segs=(list pseg)] :: / /todos /todo/[id=@ud]
1021 [%apply at=span ref=(list term) args=(list shape)] :: (list @t)
1020 [%apply at=span ref=(list term) args=(list shape)] :: (list @t)
1022 [%cell at=span fields=(list field)] :: [text=@t done=?]
1021 [%cell at=span fields=(list field)] :: [text=@t done=?]
@@ -1025,9 +1024,9 @@
1025 [%generic at=span vars=(list @t) body=shape] :: +$ name |$ [M] …
1024 [%generic at=span vars=(list @t) body=shape] :: +$ name |$ [M] …
1026 ==
1025 ==
1027::
1026::
1028−:: +pseg: a path mold's segment, a knot, [name=aura], or [name=_]
1027+:: +pseg: a path mold's segment, a knot or [name=aura]
1029::
1028::
1030−+$ pseg $%([%knot p=@ta] [%typed at=span name=term aura=@ta] [%inferred at=span name=term hole-at=span])
1029++$ pseg $%([%knot p=@ta] [%typed at=span name=term aura=@ta])
1031::
1030::
1032+| %api
1031+| %api
1033::
1032::
@@ -1296,7 +1295,6 @@
1296 (emit 1 %'=')
1295 (emit 1 %'=')
1297 ?: =('`' a) (emit 1 %'`')
1296 ?: =('`' a) (emit 1 %'`')
1298 ?: =('*' a) (emit 1 %'*')
1297 ?: =('*' a) (emit 1 %'*')
1299− ?: =('_' a) (emit 1 %'_')
1300 ?: =('~' a)
1298 ?: =('~' a)
1301 ?: =('[' b) (emit 2 %'~[')
1299 ?: =('[' b) (emit 2 %'~[')
1302 ?: =('&' b) (emit 2 %'~&')
1300 ?: =('&' b) (emit 2 %'~&')
@@ -1672,14 +1670,14 @@
1672:: What may begin each place the parser reads (section 3, Errors):
1670:: What may begin each place the parser reads (section 3, Errors):
1673:: an expression a-z 0-9 " ( [ ~ % / ` | ^ ? !
1671:: an expression a-z 0-9 " ( [ ~ % / ` | ^ ? !
1674:: an operand a-z 0-9 " ( [ ~ % / ` | !
1672:: an operand a-z 0-9 " ( [ ~ % / ` | !
1675−:: a mold a-z A-Z @ * ! ? ~ % / ( [ $ _
1673+:: a mold a-z A-Z @ * ! ? ~ % / ( [ $
1676:: a pattern a-z 0-9 " ~ % * [
1674:: a pattern a-z 0-9 " ~ % * [
1677:: and what may go tight after an operand: . ( + = after a name, a
1675:: and what may go tight after an operand: . ( + = after a name, a
1678:: closer ) ] }, or the : of a comment
1676:: closer ) ] }, or the : of a comment
1679::
1677::
1680++ expr-mask 0x57ff.ffff.4800.0000.83ff.8126.0000.0000
1678++ expr-mask 0x57ff.ffff.4800.0000.83ff.8126.0000.0000
1681++ operand-mask 0x57ff.ffff.0800.0000.03ff.8126.0000.0000
1679++ operand-mask 0x57ff.ffff.0800.0000.03ff.8126.0000.0000
1682−++ mold-mask 0x47ff.fffe.8fff.ffff.8000.8532.0000.0000
1680+++ mold-mask 0x47ff.fffe.0fff.ffff.8000.8532.0000.0000
1683++ bar-mask 0x1000.0000.0000.0000.0000.0000.0000.0000
1681++ bar-mask 0x1000.0000.0000.0000.0000.0000.0000.0000
1684++ pattern-mask 0x47ff.fffe.0800.0000.03ff.0424.0000.0000
1682++ pattern-mask 0x47ff.fffe.0800.0000.03ff.0424.0000.0000
1685++ after-mask 0x2000.0000.2000.0000.2400.4b00.0000.0000
1683++ after-mask 0x2000.0000.2000.0000.2400.4b00.0000.0000
@@ -2109,7 +2107,6 @@
2109 ?- -.s
2107 ?- -.s
2110 %knot (weld "/" (trip p.s))
2108 %knot (weld "/" (trip p.s))
2111 %typed "/[{(trip name.s)}=@{(trip aura.s)}]"
2109 %typed "/[{(trip name.s)}=@{(trip aura.s)}]"
2112− %inferred "/[{(trip name.s)}=_]"
2113 ==
2110 ==
2114::
2111::
2115++ show-tvars
2112++ show-tvars
@@ -2321,7 +2318,6 @@
2321 %const (nod "const" at.s (show-lit lit.s) ~)
2318 %const (nod "const" at.s (show-lit lit.s) ~)
2322 %ref (nod "ref" at.s (show-names names.s) ~)
2319 %ref (nod "ref" at.s (show-names names.s) ~)
2323 %tvar (nod "tvar" at.s (trip name.s) ~)
2320 %tvar (nod "tvar" at.s (trip name.s) ~)
2324− %hole (nod "hole" at.s "" ~)
2325 %path (nod "path" at.s (show-psegs segs.s) ~)
2321 %path (nod "path" at.s (show-psegs segs.s) ~)
2326 %apply (nod "apply" at.s (show-names ref.s) (turn args.s sexp-shape))
2322 %apply (nod "apply" at.s (show-names ref.s) (turn args.s sexp-shape))
2327 %cell (nod "cell" at.s "" (turn fields.s sexp-field))
2323 %cell (nod "cell" at.s "" (turn fields.s sexp-field))
@@ -3846,7 +3842,6 @@
3846 %'*' [%& [%noun at.t ~] t.ts]
3842 %'*' [%& [%noun at.t ~] t.ts]
3847 %'!!' [%& [%void at.t ~] t.ts]
3843 %'!!' [%& [%void at.t ~] t.ts]
3848 %'?' [%& [%flag at.t ~] t.ts]
3844 %'?' [%& [%flag at.t ~] t.ts]
3849− %'_' [%& [%hole at.t ~] t.ts]
3850 [%name *] [%& [%ref at.t ~[p.lex.t]] t.ts]
3845 [%name *] [%& [%ref at.t ~[p.lex.t]] t.ts]
3851 [%wing *] [%& [%ref at.t p.lex.t] t.ts]
3846 [%wing *] [%& [%ref at.t p.lex.t] t.ts]
3852 [%tvar *] [%& [%tvar at.t p.lex.t] t.ts]
3847 [%tvar *] [%& [%tvar at.t p.lex.t] t.ts]
@@ -4063,7 +4058,7 @@
4063 ?: &(?=(^ nex) tight.i.nex) (bad nex "a path segment")
4058 ?: &(?=(^ nex) tight.i.nex) (bad nex "a path segment")
4064 (bad-space i.after nex "a path segment")
4059 (bad-space i.after nex "a path segment")
4065 ::
4060 ::
4066− :: +read-pseg: a path mold's knot, [name=aura], or [name=_] with no
4061+ :: +read-pseg: a path mold's segment, a knot or [name=aura] with no
4067 :: spaces, and where it ends
4062 :: spaces, and where it ends
4068 ::
4063 ::
4069 ++ read-pseg
4064 ++ read-pseg
@@ -4080,16 +4075,13 @@
4080 ?: |(?=(~ r2) !tight.i.r2) (bad-space i.r1 r2 "`=`")
4075 ?: |(?=(~ r2) !tight.i.r2) (bad-space i.r1 r2 "`=`")
4081 ?. ?=([[* * %'='] *] r2) (bad-in r2 "`=`" tis-mask)
4076 ?. ?=([[* * %'='] *] r2) (bad-in r2 "`=`" tis-mask)
4082 =/ r3=(list token) t.r2
4077 =/ r3=(list token) t.r2
4083− ?: |(?=(~ r3) !tight.i.r3) (bad-space i.r2 r3 "an aura or type hole")
4078+ ?: |(?=(~ r3) !tight.i.r3) (bad-space i.r2 r3 "an aura")
4084− ?. ?=([[* * ?([%aura *] %'_')] *] r3) (bad-in r3 "an aura or type hole" (con pat-mask (bex 95)))
4079+ ?. ?=([[* * [%aura *]] *] r3) (bad-in r3 "an aura" pat-mask)
4085 =/ r4=(list token) t.r3
4080 =/ r4=(list token) t.r3
4086 ?: |(?=(~ r4) !tight.i.r4) (bad-space i.r3 r4 "`]`")
4081 ?: |(?=(~ r4) !tight.i.r4) (bad-space i.r3 r4 "`]`")
4087 ?. ?=([[* * %']'] *] r4) (bad-in r4 "`]`" ser-mask)
4082 ?. ?=([[* * %']'] *] r4) (bad-in r4 "`]`" ser-mask)
4088 =/ at=span [beg.at.op end.at.i.r4]
4083 =/ 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]
4091− [%typed at p.lex.i.r1 p.lex.i.r3]
4092− [%& [seg end.at.i.r4] t.r4]
4084+ [%& [[%typed at p.lex.i.r1 p.lex.i.r3] end.at.i.r4] t.r4]
4093 --
4085 --
4094::
4086::
4095+| %span-check
4087+| %span-check
@@ -4473,7 +4465,6 @@
4473 %const [%const at.s ~[%lit] %one ~]
4465 %const [%const at.s ~[%lit] %one ~]
4474 %ref [%ref at.s ~[%name %wing] %one ~]
4466 %ref [%ref at.s ~[%name %wing] %one ~]
4475 %tvar [%tvar at.s ~[%tvar] %one ~]
4467 %tvar [%tvar at.s ~[%tvar] %one ~]
4476− %hole [%hole at.s ~[%'_'] %one ~]
4477 %apply [%apply at.s ~[%'('] %shut (turn args.s outline-shape)]
4468 %apply [%apply at.s ~[%'('] %shut (turn args.s outline-shape)]
4478 %cell [%cell at.s ~[%'['] %shut (turn fields.s outline-sample)]
4469 %cell [%cell at.s ~[%'['] %shut (turn fields.s outline-sample)]
4479 ::
4470 ::
@@ -4482,11 +4473,8 @@
4482 %+ murn segs.s
4473 %+ murn segs.s
4483 |= g=pseg
4474 |= g=pseg
4484 ^- (unit outline)
4475 ^- (unit outline)
4485− ?- -.g
4486− %knot ~
4487− %typed `[%typed at.g ~[%'['] %shut ~]
4476+ ?. ?=(%typed -.g) ~
4488− %inferred `[%typed at.g ~[%'['] %shut ~[[%hole hole-at.g ~[%'_'] %one ~]]]
4477+ `[%typed at.g ~[%'['] %shut ~]
4489− ==
4490 [%path at.s ~[%'/'] %run ks]
4478 [%path at.s ~[%'/'] %run ks]
4491 ::
4479 ::
4492 %union
4480 %union
@@ -4546,8 +4534,6 @@
4546 [%path [1 9] [1 9] [1 21]]
4534 [%path [1 9] [1 9] [1 21]]
4547 [%face [1 7] [1 7] [1 21]]
4535 [%face [1 7] [1 7] [1 21]]
4548 ==
4536 ==
4549− :: an inferred path aura's hole spanning its = as well
4550− ['+$ x /a/[id=_]' ~[[%hole [1 13] [1 12] [1 14]]]]
4551 :: an import's path cut short
4537 :: an import's path cut short
4552 ['/= c /ui/c' ~[[%jibb [1 1] [1 1] [1 11]]]]
4538 ['/= c /ui/c' ~[[%jibb [1 1] [1 1] [1 11]]]]
4553 :: brackets that close with the deeper lines, cut at their line's
4539 :: brackets that close with the deeper lines, cut at their line's
@@ -4607,8 +4593,6 @@
4607:: Atom constraints tied to an explicit capital or an inferred sample
4593:: Atom constraints tied to an explicit capital or an inferred sample
4608:: are generalized and printed. Other aura variables remain unsupported until
4594:: are generalized and printed. Other aura variables remain unsupported until
4609:: their defaulting and inferred generalization are implemented.
4595:: their defaulting and inferred generalization are implemented.
4610−:: Restricted-number promotion considers written capitals only; if there
4611−:: are none, it skips the otherwise unnecessary environment traversal.
4612:: Bare @ is a separate unrestricted atom type. A directional fit check
4596:: Bare @ is a separate unrestricted atom type. A directional fit check
4613:: permits concrete atoms to widen to it, never the reverse. A fit that
4597:: permits concrete atoms to widen to it, never the reverse. A fit that
4614:: needs a not-yet-implemented constraint remains unsupported. Named unions
4598:: needs a not-yet-implemented constraint remains unsupported. Named unions
@@ -4616,63 +4600,18 @@
4616:: from their display name. Generic cases must be disjoint for all arguments.
4600:: from their display name. Generic cases must be disjoint for all arguments.
4617:: Unnamed union printing is informational; it is not Jibb syntax.
4601:: Unnamed union printing is informational; it is not Jibb syntax.
4618::
4602::
4619−:: `proj` is a reserved, type-directed operation, not an ordinary gate.
4620−:: The supported fragment selects uniquely faced fields from a known record
4621−:: in source order (reordering is a doc question). It records the original
4622−:: call, source and target types, and source axes with its definition;
4623−:: A single selected field keeps its face and uses one source axis.
4624−:: Checked module interfaces retain that evidence and their source, including
4625−:: the private prelude dependency. A later lowerer must replace the call by
4626−:: an inline gate applied to the operand once; no lowering is implemented yet.
4627−:: Ordinary fits never insert a projection. Unknown or variable-origin record
4628−:: spines, nested projected fields and projections in
4629−:: recursive groups remain unsupported. Directional fits bound faced-spine
4630−:: proofs to fewer than 1,024 cells; the projection planner has a separate
4631−:: 4,096-step bound. These are inference limits, not language limits.
4632−::
4633−:: Supported API imports derive request-gate types atomically for multiple
4634−:: paths, including one typed segment or one diff fold per case. Their checked
4635−:: ordinary definitions, mark molds and supported poke constructor are also
4636−:: exported. A selected /sur mold is checked through its trusted reader result;
4637−:: unused cores and other bindings are not independently validated. APIs
4638−:: with /= imports, separate scry paths, multiple parameters or diffs, or a
4639−:: parameter together with a fold remain unsupported. The unchanged todo API
4640−:: fits this fragment, including named closed fold gates.
4641−::
4642−:: Each case's source-derived schema and canonical API identity travel in a
4643−:: dependency closure bound to the exact supplied bundle, prelude, scope and
4644−:: trusted reader results. Unknown cached entries are rebuilt. Request-bearing
4645−:: closures are limited to 256 source paths and requests. This is type
4646−:: inference only: no request lowering, runtime schema validator or proof that
4647−:: an arbitrary ask value is watchable is supplied.
4648−::
4649−:: A closed gate sample may omit one outer face from a known input slot when
4650−:: its product is identical. Distinct written names, nested value faces,
4651−:: ambiguous cell tails and raw-variable-origin fits retain their prior rules.
4652−::
4653−:: In one synthetic eval of a 48-module deep and 48-module wide request-free
4654−:: graph, baseline versus certificate inference took 21.53 s versus 23.10 s
4655−:: elapsed (21.10 s versus 22.34 s CPU), including startup. The deep cache's
4656−:: jam grew from 2,402 to 4,209 bytes (+1,807 bytes). These single-run figures
4657−:: are not production memory or performance benchmarks.
4658−::
4659+$ itype
4603+$ itype
4660 $~ [%var 0]
4604 $~ [%var 0]
4661 $% [%var id=@ud]
4605 $% [%var id=@ud]
4662 [%avar id=@ud]
4606 [%avar id=@ud]
4663− [%rvar id=@ud]
4664 [%nvar id=@ud]
4607 [%nvar id=@ud]
4665− [%rnvar id=@ud]
4666 [%atom aura=@ta]
4608 [%atom aura=@ta]
4667 [%any-atom ~]
4609 [%any-atom ~]
4668 [%flag ~]
4610 [%flag ~]
4669− [%noun ~]
4670 [%tag id=@ud literal=lit constructor=?]
4611 [%tag id=@ud literal=lit constructor=?]
4671 [%const literal=lit]
4612 [%const literal=lit]
4672 [%collection name=term args=(list itype)]
4613 [%collection name=term args=(list itype)]
4673 [%recursive module=term name=term label=(unit @t)]
4614 [%recursive module=term name=term label=(unit @t)]
4674− [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4675− [%grec at=path name=term label=(unit @t) proof=shape args=(list itype)]
4676 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4615 [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4677 [%face name=term body=itype]
4616 [%face name=term body=itype]
4678 [%fn sample=itype product=itype]
4617 [%fn sample=itype product=itype]
@@ -4696,32 +4635,18 @@
4696 %var
4635 %var
4697 =/ found=(unit itype) (itype-lookup id.t sub)
4636 =/ found=(unit itype) (itype-lookup id.t sub)
4698 ?~ found t
4637 ?~ found t
4699− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4700 $(t u.found)
4638 $(t u.found)
4701 %avar
4639 %avar
4702 =/ found=(unit itype) (itype-lookup id.t sub)
4640 =/ found=(unit itype) (itype-lookup id.t sub)
4703 ?~ found t
4641 ?~ found t
4704− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4705− $(t u.found)
4706− %rvar
4707− =/ found=(unit itype) (itype-lookup id.t sub)
4708− ?~ found t
4709− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4710 $(t u.found)
4642 $(t u.found)
4711 %nvar
4643 %nvar
4712 =/ found=(unit itype) (itype-lookup id.t sub)
4644 =/ found=(unit itype) (itype-lookup id.t sub)
4713 ?~ found t
4645 ?~ found t
4714− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4715− $(t u.found)
4716− %rnvar
4717− =/ found=(unit itype) (itype-lookup id.t sub)
4718− ?~ found t
4719− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4720 $(t u.found)
4646 $(t u.found)
4721 %tag
4647 %tag
4722 =/ found=(unit itype) (itype-lookup id.t sub)
4648 =/ found=(unit itype) (itype-lookup id.t sub)
4723 ?~ found t
4649 ?~ found t
4724− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4725 $(t u.found)
4650 $(t u.found)
4726 ==
4651 ==
4727::
4652::
@@ -4732,19 +4657,14 @@
4732 ?- -.t
4657 ?- -.t
4733 %var =(n id.t)
4658 %var =(n id.t)
4734 %avar =(n id.t)
4659 %avar =(n id.t)
4735− %rvar =(n id.t)
4736 %nvar =(n id.t)
4660 %nvar =(n id.t)
4737− %rnvar =(n id.t)
4738 %atom |
4661 %atom |
4739 %any-atom |
4662 %any-atom |
4740 %flag |
4663 %flag |
4741− %noun |
4742 %tag =(n id.t)
4664 %tag =(n id.t)
4743 %const |
4665 %const |
4744 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4666 %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4745 %recursive |
4667 %recursive |
4746− %jrec |
4747− %grec (lien args.t |=(c=itype (itype-occurs n c sub)))
4748 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4668 %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4749 %face $(t body.t)
4669 %face $(t body.t)
4750 %fn |($(t sample.t) $(t product.t))
4670 %fn |($(t sample.t) $(t product.t))
@@ -4763,11 +4683,6 @@
4763 =. a (itype-walk a sub)
4683 =. a (itype-walk a sub)
4764 =. b (itype-walk b sub)
4684 =. b (itype-walk b sub)
4765 ?: =(a b) `sub
4685 ?: =(a b) `sub
4766− ?: &(?=(%grec -.a) ?=(%grec -.b))
4767− ?. &(=(at.a at.b) =(name.a name.b)) ~
4768− (itype-unify-args args.a args.b sub)
4769− ?: &(?=(%jrec -.a) ?=(%jrec -.b))
4770− ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
4771 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4686 ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4772 ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4687 ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4773 ?: &(?=(%union -.a) ?=(%union -.b))
4688 ?: &(?=(%union -.a) ?=(%union -.b))
@@ -4784,32 +4699,6 @@
4784 ?: ?=(%var -.b)
4699 ?: ?=(%var -.b)
4785 ?: (itype-occurs id.b a sub) ~
4700 ?: (itype-occurs id.b a sub) ~
4786 `[[id.b a] sub]
4701 `[[id.b a] sub]
4787− :: Arithmetic's aura variable excludes loobeans; decimal literals
4788− :: remain defaultable until a later constraint makes them concrete.
4789− ?: &(?=(%nvar -.a) ?=(%rvar -.b))
4790− `[[id.b [%rnvar id.a]] [id.a [%rnvar id.a]] sub]
4791− ?: &(?=(%rvar -.a) ?=(%nvar -.b))
4792− `[[id.a [%rnvar id.b]] [id.b [%rnvar id.b]] sub]
4793− ?: &(?=(%rnvar -.a) ?=(%rvar -.b)) `[[id.b a] sub]
4794− ?: &(?=(%rvar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4795− ?: &(?=(%rnvar -.a) ?=(%nvar -.b)) `[[id.b a] sub]
4796− ?: &(?=(%nvar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4797− ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4798− ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4799− ?: ?=(%rnvar -.a)
4800− ?. |(?=(%rnvar -.b) ?=(%atom -.b)) ~
4801− `[[id.a b] sub]
4802− ?: ?=(%rnvar -.b)
4803− ?. ?=(%atom -.a) ~
4804− `[[id.b a] sub]
4805− ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
4806− ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4807− ?: ?=(%rvar -.a)
4808− ?. |(?=(%rvar -.b) ?=(%atom -.b)) ~
4809− `[[id.a b] sub]
4810− ?: ?=(%rvar -.b)
4811− ?. ?=(%atom -.a) ~
4812− `[[id.b a] sub]
4813 :: The narrower decimal constraint survives a match with an atom
4702 :: The narrower decimal constraint survives a match with an atom
4814 :: variable; decimal syntax alone does not make it a loobean.
4703 :: variable; decimal syntax alone does not make it a loobean.
4815 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4704 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
@@ -4864,19 +4753,14 @@
4864 ?- -.t
4753 ?- -.t
4865 %var |
4754 %var |
4866 %avar |
4755 %avar |
4867− %rvar |
4868 %nvar |
4756 %nvar |
4869− %rnvar |
4870 %atom |
4757 %atom |
4871 %any-atom &
4758 %any-atom &
4872 %flag |
4759 %flag |
4873− %noun |
4874 %tag |
4760 %tag |
4875 %const |
4761 %const |
4876 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4762 %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4877 %recursive |
4763 %recursive |
4878− %jrec |
4879− %grec (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4880 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4764 %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4881 %face $(t body.t)
4765 %face $(t body.t)
4882 %fn |($(t sample.t) $(t product.t))
4766 %fn |($(t sample.t) $(t product.t))
@@ -4939,19 +4823,14 @@
4939 ?- -.typ
4823 ?- -.typ
4940 %var |
4824 %var |
4941 %avar |
4825 %avar |
4942− %rvar |
4943 %nvar |
4826 %nvar |
4944− %rnvar |
4945 %atom &
4827 %atom &
4946 %any-atom &
4828 %any-atom &
4947 %flag &
4829 %flag &
4948− %noun |
4949 %tag &
4830 %tag &
4950 %const &
4831 %const &
4951 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4832 %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4952 %recursive |
4833 %recursive |
4953− %jrec |
4954− %grec (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4955 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4834 %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4956 %face $(typ body.typ)
4835 %face $(typ body.typ)
4957 %fn |($(typ sample.typ) $(typ product.typ))
4836 %fn |($(typ sample.typ) $(typ product.typ))
@@ -4980,7 +4859,6 @@
4980 ^- ?
4859 ^- ?
4981 =. t (itype-walk t sub)
4860 =. t (itype-walk t sub)
4982 ?- -.t
4861 ?- -.t
4983− %grec (lien args.t |=(c=itype (itype-has-face c sub)))
4984 %collection (lien args.t |=(c=itype (itype-has-face c sub)))
4862 %collection (lien args.t |=(c=itype (itype-has-face c sub)))
4985 %face &
4863 %face &
4986 %cell |($(t hed.t) $(t tal.t))
4864 %cell |($(t hed.t) $(t tal.t))
@@ -4988,42 +4866,6 @@
4988 * |
4866 * |
4989 ==
4867 ==
4990::
4868::
4991−:: Closed function samples may omit a slot face, but a known name must
4992−:: match another known name. Keep nested value faces and require exact
4993−:: invariant compatibility; a faced tail against a cell is ambiguous.
4994−++ itype-closed-slot-match
4995− |= [a=itype b=itype]
4996− ^- ?
4997− ?: &(?=(%face -.a) ?=(%face -.b))
4998− ?. =(name.a name.b) |
4999− ?=(^ (itype-unify body.a body.b ~))
5000− ?: ?=(%face -.a) ?=(^ (itype-unify body.a b ~))
5001− ?: ?=(%face -.b) ?=(^ (itype-unify a body.b ~))
5002− ?=(^ (itype-unify a b ~))
5003−++ itype-closed-sample-match
5004− |= [a=itype b=itype fuel=@ud]
5005− ^- ?
5006− ?: =(0 fuel) |
5007− ?. &(?=(%cell -.a) ?=(%cell -.b)) |
5008− ?. (itype-closed-slot-match hed.a hed.b) |
5009− =/ x=itype tal.a
5010− =/ y=itype tal.b
5011− ?: &(?=(%cell -.x) ?=(%cell -.y))
5012− ?=(^ (itype-unify x y ~))
5013− ?: |(&(?=(%face -.x) ?=(%cell -.y)) &(?=(%cell -.x) ?=(%face -.y))) |
5014− (itype-closed-slot-match x y)
5015−++ itype-closed-gates-match
5016− |= [a=itype b=itype]
5017− ^- ?
5018− ?. &(?=(%fn -.a) ?=(%fn -.b)) |
5019− ?. &(?=(%cell -.sample.a) ?=(%cell -.sample.b)) |
5020− ?. =(product.a product.b) |
5021− ?^ (itype-vars a) |
5022− ?^ (itype-vars b) |
5023− ?: |((itype-has-tag a) (itype-has-tag b)) |
5024− ?. (itype-closed-sample-match sample.a sample.b 1.024) |
5025− ?=(^ (itype-unify product.a product.b ~))
5026−::
5027++ itype-face-asym-collection-args
4869++ itype-face-asym-collection-args
5028 |= [as=(list itype) bs=(list itype) sub=isub]
4870 |= [as=(list itype) bs=(list itype) sub=isub]
5029 ^- ?
4871 ^- ?
@@ -5037,15 +4879,12 @@
5037 ^- ?
4879 ^- ?
5038 =. a (itype-walk a sub)
4880 =. a (itype-walk a sub)
5039 =. b (itype-walk b sub)
4881 =. b (itype-walk b sub)
5040− ?: &(?=(%grec -.a) ?=(%grec -.b))
5041− ?. &(=(at.a at.b) =(name.a name.b)) |
5042− (itype-face-asym-collection-args args.a args.b sub)
5043 ?: &(?=(%collection -.a) ?=(%collection -.b))
4882 ?: &(?=(%collection -.a) ?=(%collection -.b))
5044 ?. =(name.a name.b) |
4883 ?. =(name.a name.b) |
5045 (itype-face-asym-collection-args args.a args.b sub)
4884 (itype-face-asym-collection-args args.a args.b sub)
5046 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
4885 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
5047− ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%rvar -.b) |(?=(%nvar -.b) ?=(%rnvar -.b)))
4886+ ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%nvar -.b))
5048− ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%rvar -.a) |(?=(%nvar -.a) ?=(%rnvar -.a)))
4887+ ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%nvar -.a))
5049 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
4888 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
5050 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
4889 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
5051 |
4890 |
@@ -5068,30 +4907,6 @@
5068 [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
4907 [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
5069 expected
4908 expected
5070::
4909::
5071−:: Positional call arguments do not write the sample's enclosing field
5072−:: labels. Ignore one raw sample-slot face per written argument while
5073−:: checking value faces as usual. An unknown or variable-bound cell spine
5074−:: cannot justify this distinction, so keep the existing conservative guard.
5075−++ itype-positional-slot-face-asym
5076− |= [actual=itype expected=itype sub=isub]
5077− ^- ?
5078− ?: &(?=(%fn -.actual) ?=(%fn -.expected) (itype-closed-gates-match actual expected)) |
5079− (itype-face-asym actual expected sub)
5080−::
5081−++ itype-positional-face-asym
5082− |= [args=(list expr) actual=itype expected=itype sub=isub]
5083− ^- ?
5084− ?~ args &
5085− ?~ t.args
5086− =/ slot=itype expected
5087− =? slot ?=(%face -.slot) body.slot
5088− (itype-positional-slot-face-asym actual slot sub)
5089− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) &
5090− =/ slot=itype hed.expected
5091− =? slot ?=(%face -.slot) body.slot
5092− ?: (itype-positional-slot-face-asym hed.actual slot sub) &
5093− $(args t.args, actual tal.actual, expected tal.expected)
5094−::
5095++ itype-output-may-be-cell
4910++ itype-output-may-be-cell
5096 |= [t=itype sub=isub]
4911 |= [t=itype sub=isub]
5097 ^- ?
4912 ^- ?
@@ -5101,9 +4916,6 @@
5101 %cell &
4916 %cell &
5102 %union &
4917 %union &
5103 %recursive &
4918 %recursive &
5104− %jrec &
5105− %grec &
5106− %noun &
5107 %collection &
4919 %collection &
5108 %face $(t body.t)
4920 %face $(t body.t)
5109 %fn |($(t sample.t) $(t product.t))
4921 %fn |($(t sample.t) $(t product.t))
@@ -5132,7 +4944,6 @@
5132 ^- ?
4944 ^- ?
5133 ?- -.t
4945 ?- -.t
5134 %tag &
4946 %tag &
5135− %grec (lien args.t |=(c=itype (itype-has-tag c)))
5136 %collection (lien args.t |=(c=itype (itype-has-tag c)))
4947 %collection (lien args.t |=(c=itype (itype-has-tag c)))
5137 %face $(t body.t)
4948 %face $(t body.t)
5138 %fn |($(t sample.t) $(t product.t))
4949 %fn |($(t sample.t) $(t product.t))
@@ -5146,7 +4957,6 @@
5146 ^- ?
4957 ^- ?
5147 ?- -.t
4958 ?- -.t
5148 %union &
4959 %union &
5149− %grec (lien args.t |=(c=itype (itype-has-union c)))
5150 %collection (lien args.t |=(c=itype (itype-has-union c)))
4960 %collection (lien args.t |=(c=itype (itype-has-union c)))
5151 %face $(t body.t)
4961 %face $(t body.t)
5152 %fn |($(t sample.t) $(t product.t))
4962 %fn |($(t sample.t) $(t product.t))
@@ -5165,7 +4975,6 @@
5165 %union
4975 %union
5166 ?: &(?=(~ label.t) ?=(^ args.t)) &
4976 ?: &(?=(~ label.t) ?=(^ args.t)) &
5167 (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
4977 (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
5168− %grec |(?=(~ label.t) (lien args.t |=(c=itype (itype-has-hidden-generic c))))
5169 %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
4978 %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
5170 %face $(t body.t)
4979 %face $(t body.t)
5171 %fn |($(t sample.t) $(t product.t))
4980 %fn |($(t sample.t) $(t product.t))
@@ -5178,8 +4987,6 @@
5178 ^- ?
4987 ^- ?
5179 ?- -.t
4988 ?- -.t
5180 %recursive &
4989 %recursive &
5181− %jrec &
5182− %grec &
5183 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
4990 %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5184 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
4991 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5185 %face $(t body.t)
4992 %face $(t body.t)
@@ -5193,8 +5000,6 @@
5193 ^- ?
5000 ^- ?
5194 ?- -.t
5001 ?- -.t
5195 %recursive ?=(~ label.t)
5002 %recursive ?=(~ label.t)
5196− %jrec ?=(~ label.t)
5197− %grec |(?=(~ label.t) (lien args.t |=(c=itype (itype-has-hidden-recursive c))))
5198 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5003 %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5199 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5004 %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5200 %face $(t body.t)
5005 %face $(t body.t)
@@ -5222,99 +5027,34 @@
5222 $(cases t.cases, good `trial)
5027 $(cases t.cases, good `trial)
5223 ==
5028 ==
5224::
5029::
5225−:: A constructor needs a case whose head has the same literal noun as its
5030+:: A constructor needs a case with its tag at the head and a payload
5226−:: tag. An unresolved or opaque case may reveal one later, so it cannot
5031+:: compatible with the expected gate sample. Other case forms do not
5227−:: prove a mismatch or a unique match. A broad atom mold is not a case.
5032+:: identify a constructor.
5228::
5033::
5229++ itype-fit-ctor-cases
5034++ itype-fit-ctor-cases
5230 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
5035 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
5231 ^- ifit
5036 ^- ifit
5232 =/ found=(unit ifit) ~
5037 =/ found=(unit ifit) ~
5233− =/ pending=? |
5234 |-
5038 |-
5235− ?~ cases
5236− ?: pending [%unknown ~]
5237− ?~ found [%bad ~]
5039+ ?~ cases ?~(found [%bad ~] u.found)
5238− u.found
5239− =/ raw=itype i.cases
5240− ?: ?=(%var -.raw)
5241− $(cases t.cases, pending &)
5242− =/ c=itype (itype-walk raw sub)
5040+ =/ c=itype (itype-walk i.cases sub)
5243− ?: ?=(?(%var %tag %recursive %jrec %grec %union %face) -.c)
5244− $(cases t.cases, pending &)
5245 ?. ?=(%cell -.c) $(cases t.cases)
5041 ?. ?=(%cell -.c) $(cases t.cases)
5246− =/ raw-head=itype hed.c
5042+ =/ head=itype (itype-walk hed.c sub)
5247− ?: ?=(%var -.raw-head)
5248− $(cases t.cases, pending &)
5249− =/ head=itype (itype-walk raw-head sub)
5250− :: A single faced, explicitly atom-only head cannot be the tag case.
5251− :: Do not follow variables or peel nested faces for this negative proof.
5252− ?: ?=(%face -.head)
5253− ?: ?=(?(%atom %any-atom %flag %avar %rvar %nvar %rnvar) -.body.head)
5254− $(cases t.cases)
5255− $(cases t.cases, pending &)
5256− ?: ?=(?(%var %tag %recursive %jrec %grec %union) -.head)
5257− $(cases t.cases, pending &)
5258 ?. ?=(%const -.head) $(cases t.cases)
5043 ?. ?=(%const -.head) $(cases t.cases)
5044+ ?. =(%term form.literal.head) $(cases t.cases)
5259 ?. =(val.literal.head val.tag) $(cases t.cases)
5045 ?. =(val.literal.head val.tag) $(cases t.cases)
5260− :: Equal heads can have disjoint payloads. Test each from the original
5046+ ?^ found [%unknown ~]
5261− :: substitution; a unique success is usable only with no unknown rival.
5262 =/ trial=ifit (itype-fit sample tal.c sub next)
5047 =/ trial=ifit (itype-fit sample tal.c sub next)
5263− ?- -.trial
5264− %bad $(cases t.cases)
5265− %unknown $(cases t.cases, pending &)
5266− %ok
5267− ?^ found [%unknown ~]
5268− $(cases t.cases, found `trial)
5048+ $(cases t.cases, found `trial)
5269− ==
5270::
5049::
5271++ itype-fit
5050++ itype-fit
5272 |= [actual=itype expected=itype sub=isub next=@ud]
5051 |= [actual=itype expected=itype sub=isub next=@ud]
5273 ^- ifit
5052 ^- ifit
5274− (itype-fit-inner actual expected sub next | |)
5275−++ itype-fit-inner
5276− |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5277− ^- ifit
5278− ?: &(!skip-width ?=(%cell -.actual) ?=(%cell -.expected) |((width-spine-exhausted actual 1.024) (width-spine-exhausted expected 1.024)))
5279− [%unknown ~]
5280− =/ known=(unit [source=iwfields target=iwfields])
5281− ?: skip-width ~
5282− (width-known-shape actual expected sub)
5283− =/ too-wide=? ?~(known | (gth (lent order.source.u.known) (lent order.target.u.known)))
5284− ?: too-wide [%unknown ~]
5285− =/ spine-checked=? |(spine-proof ?=(^ known))
5286 =/ uncertain=?
5053 =/ uncertain=?
5287− |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)))
5054+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
5288− =/ actual-open=?
5289− |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))
5290 =. actual (itype-walk actual sub)
5055 =. actual (itype-walk actual sub)
5291 =. expected (itype-walk expected sub)
5056 =. expected (itype-walk expected sub)
5292 ?: =(actual expected) [%ok sub next]
5057 ?: =(actual expected) [%ok sub next]
5293− :: The relation of the source loobean mold to explicit @f is not yet
5294− :: established. Keep it unsupported rather than asserting a mismatch.
5295− ?: &(?=(%flag -.actual) ?=(%atom -.expected) =(%f aura.expected)) [%unknown ~]
5296− :: Any value can be used where a noun is expected. An unresolved
5297− :: bare tag is fixed as a constant; a constructor still needs a gate.
5298− ?: ?=(%noun -.expected)
5299− ?: ?=(%tag -.actual)
5300− ?: constructor.actual [%unknown ~]
5301− [%ok [[id.actual expected] sub] next]
5302− [%ok sub next]
5303− :: An arbitrary noun is not known to fit a narrower type.
5304− ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5305− ?: &(!uncertain ?=(%grec -.actual) ?=(%face -.expected)) $(expected body.expected)
5306− ?: &(!uncertain ?=(%face -.actual) ?=(%grec -.expected)) $(actual body.actual)
5307− ?: &(?=(%grec -.actual) ?=(%grec -.expected))
5308− ?. &(=(at.actual at.expected) =(name.actual name.expected)) [%unknown ~]
5309− =/ matched=(unit isub) (itype-unify-args args.actual args.expected sub)
5310− ?~ matched [%unknown ~]
5311− [%ok u.matched next]
5312− ?: &(|(?=(%grec -.actual) ?=(%grec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5313− ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5314− ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5315− ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
5316− ?:(&(=(at.actual at.expected) =(name.actual name.expected) =(head.actual head.expected) =(aura.actual aura.expected) =(tail.actual tail.expected)) [%ok sub next] [%bad ~])
5317− ?: &(|(?=(%jrec -.actual) ?=(%jrec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5318 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5058 ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5319 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5059 ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5320 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5060 ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
@@ -5326,21 +5066,8 @@
5326 =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5066 =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5327 ?^ unified [%ok u.unified next]
5067 ?^ unified [%ok u.unified next]
5328 [%unknown ~]
5068 [%unknown ~]
5329− :: A known union can instantiate an unconstrained sample directly;
5330− :: preserve unknown results for variable-bound union origins.
5331− ?: &(!actual-open ?=(%union -.actual) ?=(%var -.expected))
5332− ?~ origin.actual [%unknown ~]
5333− =/ normalized=itype (itype-normalize actual sub)
5334− ?: |((itype-has-tag normalized) (itype-has-recursive normalized) (itype-has-any-atom actual sub)) [%unknown ~]
5335− =/ unified=(unit isub) (itype-unify actual expected sub)
5336− ?~ unified [%unknown ~]
5337− [%ok u.unified next]
5338− :: A concrete union value in a tuple may acquire the expected field's
5339− :: face. A variable-bound union still needs face propagation support.
5340− ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5341− $(expected body.expected)
5342 ?: ?=(%union -.actual) [%unknown ~]
5069 ?: ?=(%union -.actual) [%unknown ~]
5343− ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))) [%unknown ~]
5070+ ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
5344 ?: &(?=(%union -.expected) !?=(%var -.actual))
5071 ?: &(?=(%union -.expected) !?=(%var -.actual))
5345 (itype-fit-cases actual cases.expected sub next)
5072 (itype-fit-cases actual cases.expected sub next)
5346 ?: ?=(%tag -.actual)
5073 ?: ?=(%tag -.actual)
@@ -5348,7 +5075,7 @@
5348 =/ u=(unit isub) (itype-unify actual expected sub)
5075 =/ u=(unit isub) (itype-unify actual expected sub)
5349 ?~ u [%bad ~]
5076 ?~ u [%bad ~]
5350 [%ok u.u next]
5077 [%ok u.u next]
5351− ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5078+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5352 ?: ?=(%face -.expected) $(expected body.expected)
5079 ?: ?=(%face -.expected) $(expected body.expected)
5353 ?: constructor.actual
5080 ?: constructor.actual
5354 ?. ?=(%fn -.expected) [%bad ~]
5081 ?. ?=(%fn -.expected) [%bad ~]
@@ -5357,10 +5084,6 @@
5357 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
5084 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
5358 ?. ?=(%ok -.trial) trial
5085 ?. ?=(%ok -.trial) trial
5359 [%ok [[id.actual expected] sub.trial] next.trial]
5086 [%ok [[id.actual expected] sub.trial] next.trial]
5360− :: Zero may be the empty list. A nested cell fit lacks the context
5361− :: needed to resolve it here, so do not report a definite mismatch.
5362− ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5363− [%unknown ~]
5364 ?: ?=(%const -.expected)
5087 ?: ?=(%const -.expected)
5365 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
5088 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
5366 ?: ?=(%atom -.expected)
5089 ?: ?=(%atom -.expected)
@@ -5376,17 +5099,11 @@
5376 =/ u=(unit isub) (itype-unify actual expected sub)
5099 =/ u=(unit isub) (itype-unify actual expected sub)
5377 ?~ u [%bad ~]
5100 ?~ u [%bad ~]
5378 [%ok u.u next]
5101 [%ok u.u next]
5379− ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5102+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5380 ?: ?=(%face -.expected) $(expected body.expected)
5103 ?: ?=(%face -.expected) $(expected body.expected)
5381− ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5382− [%unknown ~]
5383 ?: ?=(%const -.expected)
5104 ?: ?=(%const -.expected)
5384 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5105 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5385 ?: ?=(%atom -.expected)
5106 ?: ?=(%atom -.expected)
5386− :: A loobean singleton must not silently widen into another aura.
5387− ?: =(%loobean form.literal.actual)
5388− ?: =(%f aura.expected) [%unknown ~]
5389− [%bad ~]
5390 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
5107 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
5391 [%bad ~]
5108 [%bad ~]
5392 ?: ?=(%flag -.expected)
5109 ?: ?=(%flag -.expected)
@@ -5394,14 +5111,8 @@
5394 ?: ?=(%any-atom -.expected) [%ok sub next]
5111 ?: ?=(%any-atom -.expected) [%ok sub next]
5395 [%bad ~]
5112 [%bad ~]
5396 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5113 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5397− :: A known face labels the same noun. Peel it before applying the
5398− :: directional unrestricted-atom rule, preserving raw-variable guards.
5399− ?: &(!uncertain ?=(%any-atom -.actual) ?=(%face -.expected))
5400− $(expected body.expected, skip-width |, spine-proof |)
5401− ?: &(!uncertain ?=(%any-atom -.expected) ?=(%face -.actual))
5402− $(actual body.actual, skip-width |, spine-proof |)
5403 ?: ?=(%any-atom -.expected)
5114 ?: ?=(%any-atom -.expected)
5404− ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%flag -.actual)) [%ok sub next]
5115+ ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%flag -.actual)) [%ok sub next]
5405 ?: ?=(%var -.actual)
5116 ?: ?=(%var -.actual)
5406 =/ unified=(unit isub) (itype-unify actual [%avar next] sub)
5117 =/ unified=(unit isub) (itype-unify actual [%avar next] sub)
5407 ?~ unified [%bad ~]
5118 ?~ unified [%bad ~]
@@ -5412,16 +5123,16 @@
5412 =/ unified=(unit isub) (itype-unify actual expected sub)
5123 =/ unified=(unit isub) (itype-unify actual expected sub)
5413 ?~ unified [%bad ~]
5124 ?~ unified [%bad ~]
5414 [%ok u.unified next]
5125 [%ok u.unified next]
5415− ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5126+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5416 [%bad ~]
5127 [%bad ~]
5417 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5128 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5418 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5129 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5419 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5130 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5420 [%bad ~]
5131 [%bad ~]
5421 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5132 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5422− =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
5133+ =/ first=ifit $(actual hed.actual, expected hed.expected)
5423 ?. ?=(%ok -.first) first
5134 ?. ?=(%ok -.first) first
5424− $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5135+ $(actual tal.actual, expected tal.expected, sub sub.first, next next.first)
5425 :: A field may add a face to an occurrence of the very same type
5136 :: A field may add a face to an occurrence of the very same type
5426 :: variable. Binding that variable to a face around itself would fail
5137 :: variable. Binding that variable to a face around itself would fail
5427 :: the occurs check, but its underlying type has already matched.
5138 :: the occurs check, but its underlying type has already matched.
@@ -5443,10 +5154,9 @@
5443 [%ok u.unified next]
5154 [%ok u.unified next]
5444 ?: &(?=(%face -.actual) ?=(%face -.expected))
5155 ?: &(?=(%face -.actual) ?=(%face -.expected))
5445 ?. =(name.actual name.expected) [%bad ~]
5156 ?. =(name.actual name.expected) [%bad ~]
5446− $(actual body.actual, expected body.expected, skip-width |, spine-proof |)
5157+ $(actual body.actual, expected body.expected)
5447− ?: ?=(%face -.actual) $(actual body.actual, skip-width |, spine-proof |)
5158+ ?: ?=(%face -.actual) $(actual body.actual)
5448− ?: ?=(%face -.expected) $(expected body.expected, skip-width |, spine-proof |)
5159+ ?: ?=(%face -.expected) $(expected body.expected)
5449− ?: &(!uncertain (itype-closed-gates-match actual expected)) [%ok sub next]
5450 ?: (itype-face-asym actual expected sub) [%unknown ~]
5160 ?: (itype-face-asym actual expected sub) [%unknown ~]
5451 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5161 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5452 [%unknown ~]
5162 [%unknown ~]
@@ -5516,194 +5226,22 @@
5516 problems
5226 problems
5517::
5227::
5518:: The expression inference below is deliberately a fragment: bindings,
5228:: The expression inference below is deliberately a fragment: bindings,
5519−:: simple gates, calls, fixed-aura literals, and some interpolated strings. The
5229+:: simple gates, unary calls, fixed-aura literals, and plain strings. The
5520:: result for unsupported syntax is a diagnostic, never a checked module.
5230:: result for unsupported syntax is a diagnostic, never a checked module.
5521::
5231::
5522+$ ischeme [typ=itype vars=(list @ud)]
5232+$ ischeme [typ=itype vars=(list @ud)]
5523+$ ienv (list [name=term scheme=ischeme])
5233+$ ienv (list [name=term scheme=ischeme])
5524+$ imold-types (list [name=term template=ischeme])
5234+$ imold-types (list [name=term template=ischeme])
5525−+$ iderived [name=term agent=term mark=term]
5235++$ ifile [values=ienv molds=imold-types at=path]
5526−+$ iwidth-definition [name=term original=expr typ=itype sub=isub projections=(list iwprojection)]
5527−+$ iwidth-dependency [at=path source=(unit @t) definitions=(list iwidth-definition)]
5528−:: Nonrecursive request evidence is compiler-owned metadata, not a property
5529−:: of an arbitrary ask value. Reader graphs and source inputs are trusted.
5530−+$ irequest-evidence
5531− [api-at=path name=term path=iapi-path-typed api-source=@t public-source=@t internal-source=@t prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5532−:: A unit distinguishes a verified empty closure from a detached legacy file.
5533−:: The opaque prelude is an exact trusted input, not a recursive interface mold.
5534−+$ irequest-graph
5535− [paths=(set path) requests=(list irequest-evidence) bundle-input=* prelude-input=* prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5536−+$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t) graph=(unit irequest-graph)]
5537+$ ijimports (list [face=term interface=ifile])
5236+$ ijimports (list [face=term interface=ifile])
5538−+$ icap [name=@t id=@ud at=span]
5237++$ icaps (list [name=@t id=@ud])
5539−+$ icaps (list icap)
5540+$ iparams (list [name=@t typ=itype])
5238+$ iparams (list [name=@t typ=itype])
5541+$ imolds (list [name=term body=shape])
5239+$ imolds (list [name=term body=shape])
5542:: A caller supplies the exact noun returned by +read-mold:jibb-import.
5240:: A caller supplies the exact noun returned by +read-mold:jibb-import.
5543:: This core has no Ford dependencies; unrecognized payloads fail closed.
5241:: This core has no Ford dependencies; unrecognized payloads fail closed.
5544+$ iexternals (list [module=term name=term result=*])
5242+$ iexternals (list [module=term name=term result=*])
5545+$ imark-externals (list [mark=term result=*])
5243+$ imark-externals (list [mark=term result=*])
5546−:: Hole obligations survive discarded expressions until their owning
5547−:: definition has inferred; their source spans support unresolved reports.
5548−+$ ihole [id=@ud at=span]
5549−:: Recursive-mold unfolding spends fuel in the threaded inference state.
5550−:: Retries can restart from an earlier state, so this bounds an attempt,
5551−:: not all parsing or module-checking work.
5552−:: Experimental: only closed, uniquely faced records have known axes.
5553−+$ iwfield [name=term axis=@ud typ=itype]
5554−+$ iwfields [order=(list iwfield) index=(map term iwfield)]
5555−+$ iwstep [name=term axis=@ud]
5556−+$ iwidth-result [steps=(list iwstep) sub=isub next=@ud]
5557−+$ iwprojection [at=span original=expr source=itype target=itype steps=(list iwstep)]
5558−++ width-scan
5559− |= [typ=itype sub=isub axis=@ud fuel=@ud]
5560− ^- (unit iwfields)
5561− =/ order=(list iwfield) ~
5562− =/ index=(map term iwfield) *(map term iwfield)
5563− |-
5564− ?: =(0 fuel) ~
5565− ?: |(?=(%var -.typ) ?=(%avar -.typ) ?=(%rvar -.typ) ?=(%nvar -.typ) ?=(%rnvar -.typ)) ~
5566− ?: ?=(%face -.typ)
5567− =/ entry=iwfield [name.typ axis body.typ]
5568− ?: ?=(^ (~(get by index) name.entry)) ~
5569− `[(flop [entry order]) (~(put by index) name.entry entry)]
5570− ?. ?=(%cell -.typ) ~
5571− =/ head=itype hed.typ
5572− ?: |(?=(%var -.head) ?=(%avar -.head) ?=(%rvar -.head) ?=(%nvar -.head) ?=(%rnvar -.head)) ~
5573− ?. ?=(%face -.head) ~
5574− =/ entry=iwfield [name.head (mul 2 axis) body.head]
5575− ?: ?=(^ (~(get by index) name.entry)) ~
5576− $(typ tal.typ, axis +((mul 2 axis)), fuel (dec fuel), order [entry order], index (~(put by index) name.entry entry))
5577−++ width-in-order
5578− |= [source=(list iwfield) target=(list iwfield)]
5579− ^- ?
5580− ?~ target &
5581− ?~ source |
5582− ?: =(name.i.source name.i.target) $(source t.source, target t.target)
5583− $(source t.source)
5584−++ width-fit-fields
5585− |= [source=(map term iwfield) target=(list iwfield) sub=isub next=@ud]
5586− ^- (unit iwidth-result)
5587− ?~ target `[~ sub next]
5588− =/ found=(unit iwfield) (~(get by source) name.i.target)
5589− ?~ found ~
5590− =/ fit=ifit (itype-fit typ.u.found typ.i.target sub next)
5591− ?. ?=(%ok -.fit) ~
5592− =/ rest=(unit iwidth-result) $(target t.target, sub sub.fit, next next.fit)
5593− ?~ rest ~
5594− `[[[name.i.target axis.u.found] steps.u.rest] sub.u.rest next.u.rest]
5595−++ width-spine-exhausted
5596− |= [t=itype fuel=@ud]
5597− ^- ?
5598− ?: =(0 fuel) &
5599− ?. ?=(%cell -.t) |
5600− ?. ?=(%face -.hed.t) |
5601− $(t tal.t, fuel (dec fuel))
5602−++ width-known-shape
5603− |= [actual=itype expected=itype sub=isub]
5604− ^- (unit [source=iwfields target=iwfields])
5605− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5606− =/ source=(unit iwfields) (width-scan actual sub 1 1.024)
5607− =/ target=(unit iwfields) (width-scan expected sub 1 1.024)
5608− ?~ source ~
5609− ?~ target ~
5610− `[u.source u.target]
5611−::
5612−++ width-shape
5613− |= [actual=itype expected=itype sub=isub]
5614− ^- (unit [source=iwfields target=iwfields])
5615− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5616− =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5617− =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5618− ?~ source ~
5619− ?~ target ~
5620− ?. (gth (lent order.u.source) (lent order.u.target)) ~
5621− `[u.source u.target]
5622−++ width-proj-shape
5623− |= [actual=itype expected=itype sub=isub]
5624− ^- (unit [source=iwfields target=iwfields])
5625− ?. &(|(?=(%cell -.actual) ?=(%face -.actual)) |(?=(%cell -.expected) ?=(%face -.expected))) ~
5626− =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5627− =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5628− ?~ source ~
5629− ?~ target ~
5630− ?: (lth (lent order.u.source) (lent order.u.target)) ~
5631− `[u.source u.target]
5632−::
5633−++ width-project
5634− |= [shape=[source=iwfields target=iwfields] sub=isub next=@ud]
5635− ^- (unit iwidth-result)
5636− ?. (width-in-order order.source.shape order.target.shape) ~
5637− (width-fit-fields index.source.shape order.target.shape sub next)
5638−::
5639−:: Provisional, globally budgeted gate-free proof. %no includes a
5640−:: gate-bearing witness; an uninhabited sibling could invalidate it.
5641−:: Input types must be resolved and normalized under valid substitutions,
5642−:: from trusted source-backed interfaces and reader results. Collection
5643−:: list/unit names rely on their existing identity invariant; this arm
5644−:: does not validate fabricated internal types.
5645−+$ igf-segment
5646− $% [%field name=term]
5647− [%head ~]
5648− [%tail ~]
5649− [%item ~]
5650− [%case index=@ud]
5651− ==
5652−+$ igate-free [verdict=?(%yes %no %unknown) inhabited=? left=@ud path=(unit (list igf-segment))]
5653−++ gate-free-types
5654− |= [types=(list itype) fuel=@ud path=(list igf-segment) index=@ud]
5655− ^- igate-free
5656− ?~ types [%yes | fuel ~]
5657− ?: =(0 fuel) [%unknown | 0 ~]
5658− =/ first=igate-free (gate-free-type i.types fuel [[%case index] path])
5659− ?: =(%no verdict.first) first
5660− =/ rest=igate-free $(types t.types, fuel left.first, index +(index))
5661− ?: =(%no verdict.rest) rest
5662− =/ inhabited=? |(inhabited.first inhabited.rest)
5663− ?: |(=(%unknown verdict.first) =(%unknown verdict.rest)) [%unknown inhabited left.rest ~]
5664− [%yes inhabited left.rest ~]
5665−++ gate-free-type
5666− |= [typ=itype fuel=@ud path=(list igf-segment)]
5667− ^- igate-free
5668− ?: =(0 fuel) [%unknown | 0 ~]
5669− =. fuel (dec fuel)
5670− ?- -.typ
5671− %fn [%no & fuel `(flop path)]
5672− %atom [%yes & fuel ~]
5673− %any-atom [%yes & fuel ~]
5674− %flag [%yes & fuel ~]
5675− %const [%yes & fuel ~]
5676− %face $(typ body.typ, path [[%field name.typ] path])
5677− %cell
5678− =/ head=igate-free $(typ hed.typ, path [[%head ~] path])
5679− =/ tail=igate-free $(typ tal.typ, fuel left.head, path [[%tail ~] path])
5680− =/ inhabited=? &(inhabited.head inhabited.tail)
5681− ?: &(=(%no verdict.head) inhabited.tail) head(left left.tail)
5682− ?: &(=(%no verdict.tail) inhabited.head) tail
5683− ?: |(!=(%yes verdict.head) !=(%yes verdict.tail)) [%unknown inhabited left.tail ~]
5684− [%yes inhabited left.tail ~]
5685− %collection
5686− ?. |(=(%list name.typ) =(%unit name.typ)) [%unknown | fuel ~]
5687− ?. ?=([* ~] args.typ) [%unknown | fuel ~]
5688− =/ item=igate-free $(typ i.args.typ, path [[%item ~] path])
5689− item(inhabited &)
5690− %union
5691− ?~ cases.typ [%unknown | fuel ~]
5692− (gate-free-types cases.typ fuel path 0)
5693− %noun [%unknown & fuel ~]
5694− %var [%unknown | fuel ~]
5695− %avar [%yes & fuel ~]
5696− %rvar [%yes & fuel ~]
5697− %nvar [%yes & fuel ~]
5698− %rnvar [%yes & fuel ~]
5699− %tag [%unknown | fuel ~]
5700− %recursive [%unknown | fuel ~]
5701− %jrec [%yes & fuel ~]
5702− %grec [%unknown | fuel ~]
5703− ==
5704−::
5705−+$ igate-prelude-evidence [iface=ifile gates=(map term def)]
5706−+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection) gate-defs=(map term def) head-evidence=(unit igate-prelude-evidence) grec-index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
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)]
5707+$ idiag [msg=tape sites=(list [at=span note=tape])]
5245+$ idiag [msg=tape sites=(list [at=span note=tape])]
5708+$ iresult (each [typ=itype state=istate] idiag)
5246+$ iresult (each [typ=itype state=istate] idiag)
5709+$ isample-result (each [typ=itype env=ienv state=istate] tape)
5247+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -5723,7 +5261,6 @@
5723 |= [t=itype sub=isub]
5261 |= [t=itype sub=isub]
5724 ^- itype
5262 ^- itype
5725 =. t (itype-walk t sub)
5263 =. t (itype-walk t sub)
5726− ?: ?=(%grec -.t) t(args (turn args.t |=(c=itype (itype-normalize c sub))))
5727 ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5264 ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5728 ?: ?=(%union -.t)
5265 ?: ?=(%union -.t)
5729 [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5266 [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
@@ -5740,8 +5277,6 @@
5740:: generalize an aura from its sample, which requires constraint analysis
5277:: generalize an aura from its sample, which requires constraint analysis
5741:: beyond this fragment; leave those cases unresolved.
5278:: beyond this fragment; leave those cases unresolved.
5742::
5279::
5743−:: This helper only controls decimal defaulting in visible types. A noun
5744−:: may contain gates and is not proof of a gate-free value.
5745++ itype-has-gate
5280++ itype-has-gate
5746 |= t=itype
5281 |= t=itype
5747 ^- ?
5282 ^- ?
@@ -5749,8 +5284,6 @@
5749 %fn &
5284 %fn &
5750 %cell |($(t hed.t) $(t tal.t))
5285 %cell |($(t hed.t) $(t tal.t))
5751 %recursive |
5286 %recursive |
5752− %jrec |
5753− %grec &
5754 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5287 %collection (lien args.t |=(c=itype (itype-has-gate c)))
5755 %face $(t body.t)
5288 %face $(t body.t)
5756 %union (lien cases.t |=(c=itype (itype-has-gate c)))
5289 %union (lien cases.t |=(c=itype (itype-has-gate c)))
@@ -5758,13 +5291,10 @@
5758 %const |
5291 %const |
5759 %var |
5292 %var |
5760 %avar |
5293 %avar |
5761− %rvar |
5762 %nvar |
5294 %nvar |
5763− %rnvar |
5764 %atom |
5295 %atom |
5765 %any-atom |
5296 %any-atom |
5766 %flag |
5297 %flag |
5767− %noun |
5768 ==
5298 ==
5769::
5299::
5770++ default-decimals
5300++ default-decimals
@@ -5773,135 +5303,26 @@
5773 ?: (itype-has-gate t) t
5303 ?: (itype-has-gate t) t
5774 ?- -.t
5304 ?- -.t
5775 %nvar [%atom %ud]
5305 %nvar [%atom %ud]
5776− %rnvar [%atom %ud]
5777− %grec t(args (turn args.t |=(c=itype (default-decimals c))))
5778 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5306 %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5779 %face [%face name.t $(t body.t)]
5307 %face [%face name.t $(t body.t)]
5780 %cell [%cell $(t hed.t) $(t tal.t)]
5308 %cell [%cell $(t hed.t) $(t tal.t)]
5781 * t
5309 * t
5782 ==
5310 ==
5783::
5311::
5784−:: A hole is solved only by a fully determined type or a written
5785−:: in-scope type variable. Ordinary fresh variables are not evidence.
5786−:: Compare representatives after substitution, since unification can
5787−:: orient a written capital toward the hole rather than the reverse.
5788−++ hole-variable-id
5789− |= t=itype
5790− ^- (unit @ud)
5791− ?- -.t
5792− %var `id.t
5793− %avar `id.t
5794− %rvar `id.t
5795− %nvar `id.t
5796− %rnvar `id.t
5797− %tag `id.t
5798− * ~
5799− ==
5800−++ hole-same-variable
5801− |= [a=itype b=itype]
5802− ^- ?
5803− =/ x=(unit @ud) (hole-variable-id a)
5804− ?~ x |
5805− =/ y=(unit @ud) (hole-variable-id b)
5806− ?~ y |
5807− =(u.x u.y)
5808−++ hole-known
5809− |= [t=itype state=istate]
5810− ^- ?
5811− =. t (itype-walk t sub.state)
5812− ?- -.t
5813− ?(%var %avar %rvar %nvar %rnvar)
5814− ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
5815− (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
5816− %tag |
5817− %any-atom &
5818− %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5819− %grec (levy args.t |=(c=itype (hole-known c state)))
5820− %collection (levy args.t |=(c=itype (hole-known c state)))
5821− %face $(t body.t)
5822− %fn &($(t sample.t) $(t product.t))
5823− %cell &($(t hed.t) $(t tal.t))
5824− * &
5825− ==
5826−++ promote-restricted-numbers
5827− |= [state=istate env=ienv]
5828− ^- istate
5829− :: With no written capitals, there is nothing to promote.
5830− ?~ caps.state state
5831− =/ ids=(list @ud) (turn caps.state |=(c=icap id.c))
5832− =/ free=(list @ud) (free-env-vars env sub.state)
5833− |-
5834− ?~ ids state
5835− =/ t=itype (itype-walk [%var i.ids] sub.state)
5836− ?: &(?=(%rnvar -.t) !(lien free |=(n=@ud =(n +.t))))
5837− $(ids t.ids, state state(sub [[+.t [%rvar +.t]] sub.state]))
5838− $(ids t.ids)
5839−::
5840−++ default-hole-numbers
5841− |= [all=(list ihole) prior=(list ihole) state=istate env=ienv permit=?]
5842− ^- istate
5843− :: Do not default a named capital or a variable captured from env.
5844− ?. permit state
5845− ?: =(all prior) state
5846− ?~ all state
5847− =/ t=itype (itype-walk [%var id.i.all] sub.state)
5848− =/ free=(list @ud) (free-env-vars env sub.state)
5849− =? state &(?=(?(%nvar %rnvar) -.t) !(hole-known t state) !(lien free |=(id=@ud =(id id.t))))
5850− state(sub [[id.t [%atom %ud]] sub.state])
5851− $(all t.all)
5852−::
5853−:: Only obligations created inside this definition belong to it.
5854−++ holes-created
5855− |= [all=(list ihole) prior=(list ihole)]
5856− ^- (list ihole)
5857− ?: =(all prior) ~
5858− ?~ all ~
5859− [i.all $(all t.all)]
5860−++ hole-uncertain
5861− |= [t=itype state=istate]
5862− ^- ?
5863− =. t (itype-walk t sub.state)
5864− ?- -.t
5865− ?(%tag %nvar %rnvar %avar %rvar) !(hole-known t state)
5866− %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5867− %grec (lien args.t |=(c=itype (hole-uncertain c state)))
5868− %collection (lien args.t |=(c=itype (hole-uncertain c state)))
5869− %face $(t body.t)
5870− %fn |($(t sample.t) $(t product.t))
5871− %cell |($(t hed.t) $(t tal.t))
5872− * |
5873− ==
5874−::
5875−++ unresolved-hole
5876− |= [all=(list ihole) prior=(list ihole) state=istate]
5877− ^- (unit idiag)
5878− =/ work=(list ihole) (flop (holes-created all prior))
5879− |-
5880− ?~ work ~
5881− ?: (hole-known [%var id.i.work] state) $(work t.work)
5882− ?: (hole-uncertain [%var id.i.work] state)
5883− `["type hole needs unsupported inference" ~[[at.i.work "type hole"]]]
5884− `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
5885−::
5886++ itype-vars
5312++ itype-vars
5887 |= t=itype
5313 |= t=itype
5888 ^- (list @ud)
5314 ^- (list @ud)
5889 ?- -.t
5315 ?- -.t
5890 %var ~[id.t]
5316 %var ~[id.t]
5891 %avar ~[id.t]
5317 %avar ~[id.t]
5892− %rvar ~[id.t]
5893 %nvar ~[id.t]
5318 %nvar ~[id.t]
5894− %rnvar ~[id.t]
5895 %atom ~
5319 %atom ~
5896 %any-atom ~
5320 %any-atom ~
5897 %flag ~
5321 %flag ~
5898− %noun ~
5899 %tag ~
5322 %tag ~
5900 %const ~
5323 %const ~
5901 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5324 %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5902 %recursive ~
5325 %recursive ~
5903− %jrec ~
5904− %grec (zing (turn args.t |=(c=itype (itype-vars c))))
5905 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5326 %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5906 %face $(t body.t)
5327 %face $(t body.t)
5907 %fn (weld $(t sample.t) $(t product.t))
5328 %fn (weld $(t sample.t) $(t product.t))
@@ -5929,28 +5350,17 @@
5929 =/ found=(unit itype) (itype-lookup id.t ren)
5350 =/ found=(unit itype) (itype-lookup id.t ren)
5930 ?~ found t
5351 ?~ found t
5931 u.found
5352 u.found
5932− %rvar
5933− =/ found=(unit itype) (itype-lookup id.t ren)
5934− ?~ found t
5935− u.found
5936 %nvar
5353 %nvar
5937 =/ found=(unit itype) (itype-lookup id.t ren)
5354 =/ found=(unit itype) (itype-lookup id.t ren)
5938 ?~ found t
5355 ?~ found t
5939 u.found
5356 u.found
5940− %rnvar
5941− =/ found=(unit itype) (itype-lookup id.t ren)
5942− ?~ found t
5943− u.found
5944 %atom t
5357 %atom t
5945 %any-atom t
5358 %any-atom t
5946 %flag t
5359 %flag t
5947− %noun t
5948 %tag t
5360 %tag t
5949 %const t
5361 %const t
5950 %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
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)))]
5951 %recursive t
5363 %recursive t
5952− %jrec t
5953− %grec t(args (turn args.t |=(c=itype (itype-rename c ren))))
5954 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5364 %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5955 %face [%face name.t $(t body.t)]
5365 %face [%face name.t $(t body.t)]
5956 %fn [%fn $(t sample.t) $(t product.t)]
5366 %fn [%fn $(t sample.t) $(t product.t)]
@@ -5966,48 +5376,19 @@
5966 ?- -.t
5376 ?- -.t
5967 %var |
5377 %var |
5968 %avar =(n id.t)
5378 %avar =(n id.t)
5969− %rvar =(n id.t)
5970 %nvar =(n id.t)
5379 %nvar =(n id.t)
5971− %rnvar =(n id.t)
5972 %atom |
5380 %atom |
5973 %any-atom |
5381 %any-atom |
5974 %flag |
5382 %flag |
5975− %noun |
5976 %tag |
5383 %tag |
5977 %const |
5384 %const |
5978 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5385 %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5979 %recursive |
5386 %recursive |
5980− %jrec |
5981− %grec (lien args.t |=(c=itype (itype-var-is-atom n c)))
5982 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5387 %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5983 %face $(t body.t)
5388 %face $(t body.t)
5984 %fn |($(t sample.t) $(t product.t))
5389 %fn |($(t sample.t) $(t product.t))
5985 %cell |($(t hed.t) $(t tal.t))
5390 %cell |($(t hed.t) $(t tal.t))
5986 ==
5391 ==
5987−++ itype-var-is-restricted
5988− |= [n=@ud t=itype]
5989− ^- ?
5990− ?- -.t
5991− %var |
5992− %avar |
5993− %rvar =(n id.t)
5994− %nvar |
5995− %rnvar |
5996− %atom |
5997− %any-atom |
5998− %flag |
5999− %noun |
6000− %tag |
6001− %const |
6002− %union |((lien cases.t |=(c=itype (itype-var-is-restricted n c))) (lien args.t |=(c=itype (itype-var-is-restricted n c))))
6003− %recursive |
6004− %jrec |
6005− %grec (lien args.t |=(c=itype (itype-var-is-restricted n c)))
6006− %collection (lien args.t |=(c=itype (itype-var-is-restricted n c)))
6007− %face $(t body.t)
6008− %fn |($(t sample.t) $(t product.t))
6009− %cell |($(t hed.t) $(t tal.t))
6010− ==
6011::
5392::
6012:: Canonical numbering makes printed variables independent of the order
5393:: Canonical numbering makes printed variables independent of the order
6013:: the unifier happened to allocate intermediates.
5394:: the unifier happened to allocate intermediates.
@@ -6019,7 +5400,7 @@
6019 =/ n=@ud 0
5400 =/ n=@ud 0
6020 |-
5401 |-
6021 ?~ vars (itype-rename t ren)
5402 ?~ vars (itype-rename t ren)
6022− =/ replacement=itype ?:((itype-var-is-restricted i.vars t) [%rvar n] ?:((itype-var-is-atom i.vars t) [%avar n] [%var n]))
5403+ =/ replacement=itype ?:((itype-var-is-atom i.vars t) [%avar n] [%var n])
6023 $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
5404 $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
6024::
5405::
6025++ instantiate-scheme
5406++ instantiate-scheme
@@ -6030,11 +5411,11 @@
6030 |-
5411 |-
6031 ?~ vars [(itype-rename typ.scheme ren) state]
5412 ?~ vars [(itype-rename typ.scheme ren) state]
6032 =/ replacement=itype
5413 =/ replacement=itype
6033− ?:((itype-var-is-restricted i.vars typ.scheme) [%rvar next.state] ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state]))
5414+ ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state])
6034 :: A generalized atom variable is a valid origin for re-generalizing
5415 :: A generalized atom variable is a valid origin for re-generalizing
6035 :: an alias, just as a sample binder is.
5416 :: an alias, just as a sample binder is.
6036 =/ st=istate state(next +(next.state))
5417 =/ st=istate state(next +(next.state))
6037− =? binders.st |(?=(%avar -.replacement) ?=(%rvar -.replacement)) [next.state binders.state]
5418+ =? binders.st ?=(%avar -.replacement) [next.state binders.state]
6038 $(vars t.vars, ren [[i.vars replacement] ren], state st)
5419 $(vars t.vars, ren [[i.vars replacement] ren], state st)
6039::
5420::
6040++ icap-lookup
5421++ icap-lookup
@@ -6105,11 +5486,6 @@
6105 ?. ?=([%ref @ @] node) ~
5486 ?. ?=([%ref @ @] node) ~
6106 ?. &(=(module +<.node) =(name +>.node)) ~
5487 ?. &(=(module +<.node) =(name +>.node)) ~
6107 `[[%unknown ~] &]
5488 `[[%unknown ~] &]
6108− %apply
6109− ?. ?=([%apply %list [* ~]] node) ~
6110− =/ item $(node -.+>.node)
6111− ?~ item ~
6112− `[[%or ~[[%atom `0] [%cell pat.u.item [%unknown ~]]]] has.u.item]
6113 %face
5489 %face
6114 ?. ?=([%face @ *] node) ~
5490 ?. ?=([%face @ *] node) ~
6115 ?. (jibb-face-name +<.node) ~
5491 ?. (jibb-face-name +<.node) ~
@@ -6148,70 +5524,12 @@
6148 $(pats t.pats)
5524 $(pats t.pats)
6149::
5525::
6150::
5526::
6151−::
6152−:: Repeated faces along an imported record spine fail closed. Hoon's type
6153−:: graph can erase unfaced nested-cell boundaries, so that alone does not
6154−:: prove the original source repeated a name within one record. A faced
6155−:: body and each union alternative have separate scopes. Check recursive
6156−:: roots before making them opaque; unused molds are never inspected.
6157−::
6158−++ imported-faces-valid
6159− |= node=*
6160− ^- ?
6161− ?@ node &
6162− ?+ -.node &
6163− %face ?:(?=([%face @ *] node) $(node +>.node) |)
6164− %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
6165− %fork (imported-faces-valid-list +.node)
6166− %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
6167− %named
6168− ?. ?=([%named @ @ *] node) |
6169− =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
6170− (imported-faces-valid body.n)
6171− ==
6172−::
6173−++ imported-faces-valid-list
6174− |= nodes=*
6175− ^- ?
6176− ?@ nodes =(nodes 0)
6177− ?. (imported-faces-valid -.nodes) |
6178− $(nodes +.nodes)
6179−::
6180−++ imported-record-faces-valid
6181− |= [node=* names=(list @)]
6182− ^- ?
6183− ?: ?=([%cell * *] node)
6184− =/ head=* +<.node
6185− =/ rest=* +>.node
6186− ?: ?=([%face @ *] head)
6187− ?: (lien names |=(n=@ =(n +<.head))) |
6188− ?. (imported-faces-valid +>.head) |
6189− $(node rest, names [+<.head names])
6190− ?. (imported-faces-valid head) |
6191− $(node rest)
6192− ?: ?=([%face @ *] node)
6193− ?: (lien names |=(n=@ =(n +<.node))) |
6194− (imported-faces-valid +>.node)
6195− (imported-faces-valid node)
6196−::
6197++ import-to-itype
5527++ import-to-itype
6198 |= node=*
5528 |= node=*
6199 ^- (unit itype)
5529 ^- (unit itype)
6200 ?@ node ~
5530 ?@ node ~
6201 ?+ -.node ~
5531 ?+ -.node ~
6202− %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
6203 %atom
5532 %atom
6204− :: A Hoon loobean singleton is one of the two Jibb loobeans.
6205− ?: ?=([%atom %f [~ @]] node)
6206− =/ value=@ +>+.node
6207− ?. |(=(value 0) =(value 1)) ~
6208− =/ printed=@t ?:(=(value 0) '%.y' '%.n')
6209− `[%const [%loobean %f value printed]]
6210− :: Hoon's null singleton is the same noun as Jibb's `~` mold.
6211− :: Other non-term singleton atoms remain unsupported here.
6212− ?: ?=([%atom %n [~ @]] node)
6213− ?. =(0 +>+.node) ~
6214− `[%const [%null %n 0 '~']]
6215 ?: ?=([%atom %tas [~ @]] node)
5533 ?: ?=([%atom %tas [~ @]] node)
6216 =/ value=@ +>+.node
5534 =/ value=@ +>+.node
6217 ?. |(=(value 0) (jibb-face-name value)) ~
5535 ?. |(=(value 0) (jibb-face-name value)) ~
@@ -6221,15 +5539,6 @@
6221 =/ aura=@ta (@ta +<.node)
5539 =/ aura=@ta (@ta +<.node)
6222 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5540 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
6223 `[%atom aura]
5541 `[%atom aura]
6224− %named
6225− ?. ?=([%named @ @ *] node) ~
6226− =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
6227− ?. &((jibb-face-name module.n) (jibb-face-name name.n)) ~
6228− ?. ?=([%fork *] body.n) ~
6229− =/ proof=(unit irec-pattern) (rec-pattern body.n (@tas module.n) (@tas name.n))
6230− ?~ proof ~
6231− ?. has.u.proof ~
6232− `[%recursive (@tas module.n) (@tas name.n) `(crip "{(trip name.n)}.{(trip module.n)}")]
6233 %apply
5542 %apply
6234 ?. ?=([%apply @ *] node) ~
5543 ?. ?=([%apply @ *] node) ~
6235 =/ name=term (@tas +<.node)
5544 =/ name=term (@tas +<.node)
@@ -6243,15 +5552,10 @@
6243 ?. =(arity (lent u.args)) ~
5552 ?. =(arity (lent u.args)) ~
6244 `[%collection name u.args]
5553 `[%collection name u.args]
6245 %fork
5554 %fork
6246− :: Hoon's ordinary ? mold is the fork of its two %f singletons.
6247− =/ raw=* +.node
6248− ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
6249− `[%flag ~]
6250− =/ cases=(unit (list itype)) (import-to-itypes raw)
5555+ =/ cases=(unit (list itype)) (import-to-itypes +.node)
6251 ?~ cases ~
5556 ?~ cases ~
6252 ?~ u.cases ~
5557 ?~ u.cases ~
6253 ?~ t.u.cases ~
5558 ?~ t.u.cases ~
6254− ?: (import-has-loobean-singleton u.cases) ~
6255 ?. (import-cases-disjoint u.cases) ~
5559 ?. (import-cases-disjoint u.cases) ~
6256 `[%union u.cases ~ ~ ~]
5560 `[%union u.cases ~ ~ ~]
6257 %face
5561 %face
@@ -6270,20 +5574,6 @@
6270 `[%cell u.left u.right]
5574 `[%cell u.left u.right]
6271 ==
5575 ==
6272::
5576::
6273−++ import-direct-loobean
6274− |= t=itype
6275− ^- ?
6276− ?: ?=(%face -.t) $(t body.t)
6277− ?: ?=(%union -.t) (import-has-loobean-singleton cases.t)
6278− ?=([%const [%loobean *]] t)
6279−::
6280−++ import-has-loobean-singleton
6281− |= cases=(list itype)
6282− ^- ?
6283− ?~ cases |
6284− ?: (import-direct-loobean i.cases) &
6285− $(cases t.cases)
6286−::
6287++ import-to-itypes
5577++ import-to-itypes
6288 |= nodes=*
5578 |= nodes=*
6289 ^- (unit (list itype))
5579 ^- (unit (list itype))
@@ -6298,9 +5588,7 @@
6298 |= typ=itype
5588 |= typ=itype
6299 ^- upat
5589 ^- upat
6300 ?- -.typ
5590 ?- -.typ
6301− %noun [%all ~]
6302 %atom [%atom ~]
5591 %atom [%atom ~]
6303− %flag [%or ~[[%atom `0] [%atom `1]]]
6304 %const [%atom `val.literal.typ]
5592 %const [%atom `val.literal.typ]
6305 %face $(typ body.typ)
5593 %face $(typ body.typ)
6306 %cell [%cell $(typ hed.typ) $(typ tal.typ)]
5594 %cell [%cell $(typ hed.typ) $(typ tal.typ)]
@@ -6328,7 +5616,6 @@
6328 ?@ result ~
5616 ?@ result ~
6329 ?. ?=(%& -.result) ~
5617 ?. ?=(%& -.result) ~
6330 =/ node=* +.result
5618 =/ node=* +.result
6331− ?. (imported-faces-valid node) ~
6332 ?@ node (import-to-itype node)
5619 ?@ node (import-to-itype node)
6333 ?: ?=(%ref -.node) (import-to-itype node)
5620 ?: ?=(%ref -.node) (import-to-itype node)
6334 =/ pattern=(unit irec-pattern) (rec-pattern node module name)
5621 =/ pattern=(unit irec-pattern) (rec-pattern node module name)
@@ -6364,7 +5651,6 @@
6364 =/ result=* result.i.found
5651 =/ result=* result.i.found
6365 ?@ result ~
5652 ?@ result ~
6366 ?. ?=(%& -.result) ~
5653 ?. ?=(%& -.result) ~
6367− ?. (imported-faces-valid +.result) ~
6368 (import-to-itype +.result)
5654 (import-to-itype +.result)
6369::
5655::
6370++ find-jibb-interface
5656++ find-jibb-interface
@@ -6395,85 +5681,25 @@
6395 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
5681 ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
6396 $(molds t.molds)
5682 $(molds t.molds)
6397::
5683::
6398−:: A prelude union alias is a display name, not a new union identity. An
6399−:: identity-generic alias can carry the origin's arguments only when the
6400−:: origin, arity and ordered parameters match. Swapped, repeated, fixed
6401−:: or phantom parameters cannot be printed that way and remain unsupported
6402−:: when their only available name is private. A nongeneric alias of a
6403−:: generic instantiation cannot be printed with the origin's arguments.
6404−++ identity-union-parameters
6405− |= [vars=(list @ud) args=(list itype)]
6406− ^- ?
6407− ?~ vars ?=(~ args)
6408− ?~ args |
6409− ?. =([%var i.vars] i.args) |
6410− $(vars t.vars, args t.args)
6411−++ prelude-union-alias
6412− |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
6413− ^- (unit term)
6414− ?~ molds ~
6415− =/ template=ischeme template.i.molds
6416− ?. ?=(%union -.typ.template) $(molds t.molds)
6417− ?. =(`origin origin.typ.template) $(molds t.molds)
6418− ?~ vars.template
6419− ?^ args $(molds t.molds)
6420− ?:(=(args args.typ.template) `name.i.molds $(molds t.molds))
6421− ?: &((identity-union-parameters vars.template args.typ.template) =((lent vars.template) (lent args)))
6422− `name.i.molds
6423− $(molds t.molds)
6424−::
6425−:: Names exported by the directly imported module are visible through its
5684+:: Only names exported by this directly imported module are visible through
6426−:: face; a matching prelude alias is also visible without a qualifier.
5685+:: its face. Other origins retain identity but print as unnamed unions.
6427−::
6428−++ jrec-alias
6429− |= [origin=path name=term molds=imold-types]
6430− ^- (unit term)
6431− ?~ molds ~
6432− =/ template=ischeme template.i.molds
6433− ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
6434− $(molds t.molds)
6435−::
6436−++ grec-visible-alias
6437− |= [origin=path name=term proof=shape args=(list itype) molds=imold-types]
6438− ^- (unit term)
6439− ?~ molds ~
6440− =/ template=ischeme template.i.molds
6441− ?. ?=(%grec -.typ.template) $(molds t.molds)
6442− ?. &(=(at.typ.template origin) =(name.typ.template name) =(proof.typ.template proof)) $(molds t.molds)
6443− ?. &((identity-union-parameters vars.template args.typ.template) =((lent vars.template) (lent args))) $(molds t.molds)
6444− `name.i.molds
6445::
5686::
6446++ itype-in-import
5687++ itype-in-import
6447− |= [t=itype iface=ifile face=term prelude=(unit ifile)]
5688+ |= [t=itype iface=ifile face=term]
6448 ^- itype
5689 ^- itype
6449 ?- -.t
5690 ?- -.t
6450 %union
5691 %union
6451 =/ label=(unit @t)
5692 =/ label=(unit @t)
6452 ?~ origin.t ~
5693 ?~ origin.t ~
6453 ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
5694 ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
6454− =/ public=(unit term)
6455− ?~ prelude ~
6456− (prelude-union-alias u.origin.t args.t molds.u.prelude)
6457− ?^ public `u.public
6458 =/ alias=(unit term) ~
5695 =/ alias=(unit term) ~
6459 =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
5696 =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
6460 =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
5697 =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
6461 ?~ alias ~
5698 ?~ alias ~
6462 `(crip "{(trip u.alias)}.{(trip face)}")
5699 `(crip "{(trip u.alias)}.{(trip face)}")
6463− [%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)))]
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)))]
6464 %recursive [%recursive module.t name.t ~]
5701 %recursive [%recursive module.t name.t ~]
6465− %grec
6466− =/ public=(unit term) ?~(prelude ~ (grec-visible-alias at.t name.t proof.t args.t molds.u.prelude))
6467− =/ alias=(unit term) ?~(public (grec-visible-alias at.t name.t proof.t args.t molds.iface) public)
6468− =/ label=(unit @t) ?~(alias ~ ?~(public `(crip "{(trip u.alias)}.{(trip face)}") `u.alias))
6469− t(label label, args (turn args.t |=(c=itype (itype-in-import c iface face prelude))))
6470− %jrec
6471− =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
6472− ?^ public t(label `u.public)
6473− =/ alias=(unit term) (jrec-alias at.t name.t molds.iface)
6474− ?~ alias t(label ~)
6475− t(label `(crip "{(trip u.alias)}.{(trip face)}"))
6476− %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
5702+ %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face)))]
6477 %face [%face name.t $(t body.t)]
5703 %face [%face name.t $(t body.t)]
6478 %fn [%fn $(t sample.t) $(t product.t)]
5704 %fn [%fn $(t sample.t) $(t product.t)]
6479 %cell [%cell $(t hed.t) $(t tal.t)]
5705 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -6546,66 +5772,9 @@
6546 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
5772 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
6547 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
5773 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
6548::
5774::
6549−:: Recognize a unique top-level source mold with exactly a null case and a
6550−:: faced atom-headed cell whose faced tail names that same mold. Its Jibb
6551−:: path and name provide nominal identity. Other recursive shapes fail closed;
6552−:: construction and matching expose the proven shape one layer at a time.
6553−++ simple-source-recursive
6554− |= [name=term sh=shape state=istate]
6555− ^- (unit itype)
6556− ?. (lien top-molds.state |=(n=term =(n name))) ~
6557− =/ original=(unit shape) (find-simple-mold name molds.state)
6558− ?~ original ~
6559− ?. =(u.original sh) ~
6560− ?. ?=(%union -.sh) ~
6561− =/ cs=(list shape) cases.sh
6562− ?~ cs ~
6563− ?~ t.cs ~
6564− ?^ t.t.cs ~
6565− ?. ?=(%const -.i.cs) ~
6566− ?. =(%null form.lit.i.cs) ~
6567− ?. ?=(%cell -.i.t.cs) ~
6568− =/ fs=(list field) fields.i.t.cs
6569− ?~ fs ~
6570− ?~ t.fs ~
6571− ?^ t.t.fs ~
6572− ?. ?=(%face -.i.fs) ~
6573− ?. ?=(%aura -.shape.i.fs) ~
6574− ?. !=(0 aura.shape.i.fs) ~
6575− ?. ?=(%face -.i.t.fs) ~
6576− ?. !=(name.i.fs name.i.t.fs) ~
6577− =/ tail=shape shape.i.t.fs
6578− ?. ?=(%ref -.tail) ~
6579− ?. =(names.tail ~[name]) ~
6580− `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
6581−::
6582−++ simple-source-generic-recursive
6583− |= [name=term sh=shape args=(list itype) state=istate]
6584− ^- (unit itype)
6585− ?. ?=(%generic -.sh) ~
6586− ?. ?=([@ ~] vars.sh) ~
6587− ?. ?=([* ~] args) ~
6588− ?~ grec-index.state ~
6589− ?. =(at.u.grec-index.state at.state) ~
6590− ?~ prelude.state ~
6591− ?. =(prelude.u.grec-index.state u.prelude.state) ~
6592− =/ proof=(unit shape) (~(get by shapes.u.grec-index.state) name)
6593− ?~ proof ~
6594− ?. =(u.proof sh) ~
6595− `[%grec at.state name `name sh args]
6596−::
6597−
6598++ infer-mold-template
5775++ infer-mold-template
6599 |= [sh=shape state=istate]
5776 |= [sh=shape state=istate]
6600 ^- (unit [template=ischeme state=istate])
5777 ^- (unit [template=ischeme state=istate])
6601− =/ generic=(unit itype)
6602− ?. ?=([@ ~] active.state) ~
6603− (simple-source-generic-recursive i.active.state sh ~[[%var next.state]] state)
6604− ?^ generic `[[u.generic ~[next.state]] state(next +(next.state))]
6605− =/ direct=(unit itype)
6606− ?. ?=([@ ~] active.state) ~
6607− (simple-source-recursive i.active.state sh state)
6608− ?^ direct `[[u.direct ~] state]
6609 ?: ?=(%generic -.sh)
5778 ?: ?=(%generic -.sh)
6610 ?~ vars.sh ~
5779 ?~ vars.sh ~
6611 ?. (distinct-params vars.sh) ~
5780 ?. (distinct-params vars.sh) ~
@@ -6613,130 +5782,28 @@
6613 =/ out=(unit [typ=itype state=istate])
5782 =/ out=(unit [typ=itype state=istate])
6614 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
5783 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
6615 ?~ out ~
5784 ?~ out ~
6616− ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6617 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
5785 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
6618 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
5786 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
6619 typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
5787 typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
6620 =/ used=(list @ud) (itype-vars typ.u.out)
5788 =/ used=(list @ud) (itype-vars typ.u.out)
6621 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
5789 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
6622− `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5790+ `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state)]
6623 =/ out=(unit [typ=itype state=istate])
5791 =/ out=(unit [typ=itype state=istate])
6624 (infer-simple-shape sh state(params ~, in-mold &))
5792 (infer-simple-shape sh state(params ~, in-mold &))
6625 ?~ out ~
5793 ?~ out ~
6626− ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6627 ?: ?=(^ (itype-vars typ.u.out)) ~
5794 ?: ?=(^ (itype-vars typ.u.out)) ~
6628− `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5795+ `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
6629−::
6630−:: A direct imported reference may carry definite reader evidence. Only
6631−:: uniquely supplied, declared inputs are used; unsupported data stay generic.
6632−++ direct-import-invalid
6633− |= [sh=shape state=istate]
6634− ^- (unit idiag)
6635− ?. ?=(%ref -.sh) ~
6636− ?~ names.sh ~
6637− =/ n=term i.names.sh
6638− =/ raw=*
6639− ?~ t.names.sh
6640− ?. (unique-value-name n marks.state) ~
6641− ?: (lien surs.state |=(x=term =(x n))) ~
6642− ?: ?=(^ (find-jibb-interface n jimports.state)) ~
6643− ?: (lien globals.state |=(x=term =(x n))) ~
6644− ?: (lien reserved-molds.state |=(x=term =(x n))) ~
6645− ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) ~
6646− =/ found=imark-externals (skim mark-externals.state |=(e=[mark=term result=*] =(mark.e n)))
6647− ?~ found ~
6648− ?^ t.found ~
6649− result.i.found
6650− ?^ t.t.names.sh ~
6651− =/ mod=term i.t.names.sh
6652− ?: ?=(^ (find-jibb-interface mod jimports.state)) ~
6653− ?. (unique-value-name mod surs.state) ~
6654− ?: (lien marks.state |=(x=term =(x mod))) ~
6655− ?: (lien globals.state |=(x=term =(x mod))) ~
6656− ?: (lien reserved-molds.state |=(x=term =(x mod))) ~
6657− ?: (lien molds.state |=(m=[name=term body=shape] =(mod name.m))) ~
6658− =/ found=iexternals (skim externals.state |=(e=[module=term name=term result=*] &(=(module.e mod) =(name.e n))))
6659− ?~ found ~
6660− ?^ t.found ~
6661− result.i.found
6662− ?. ?=([%invalid ?(%aura %core %overlap) @] raw) ~
6663− `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
6664−::
6665−:: Replay only the shape branches whose evaluation order we can prove.
6666−:: Successful prefixes must be checked before descending to a failure.
6667−++ nested-import-invalid
6668− |= [sh=shape state=istate]
6669− ^- (unit idiag)
6670− ?: ?=(^ (infer-simple-shape sh state)) ~
6671− ?- -.sh
6672− %ref
6673− =/ direct=(unit idiag) (direct-import-invalid sh state)
6674− ?^ direct direct
6675− ?~ names.sh ~
6676− ?^ t.names.sh ~
6677− =/ n=term i.names.sh
6678− ?: (lien marks.state |=(x=term =(x n))) ~
6679− ?: (lien active.state |=(x=term =(x n))) ~
6680− =/ found=(unit shape) (find-simple-mold n molds.state)
6681− ?~ found ~
6682− $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6683− %fn
6684− =/ first=(unit [typ=itype state=istate]) (infer-simple-shape sample.sh state)
6685− ?~ first $(sh sample.sh)
6686− $(sh product.sh, state state.u.first)
6687− %cell (nested-field-invalid fields.sh state)
6688− * ~
6689− ==
6690−::
6691−++ nested-field-invalid
6692− |= [fields=(list field) state=istate]
6693− ^- (unit idiag)
6694− ?~ fields ~
6695− =/ sh=shape
6696− ?- -.i.fields
6697− %bare shape.i.fields
6698− %face shape.i.fields
6699− %pun [%ref at.i.fields ~[name.i.fields]]
6700− ==
6701− =/ out=(unit [typ=itype state=istate]) (infer-simple-shape sh state)
6702− ?~ out (nested-import-invalid sh state)
6703− $(fields t.fields, state state.u.out)
6704−::
6705−++ sample-import-invalid
6706− |= [s=sample env=ienv state=istate]
6707− ^- (unit idiag)
6708− =/ result=isample-result (infer-sample s env state)
6709− ?: ?=(%& -.result) ~
6710− ?. =(p.result "sample mold is not supported by partial inference") ~
6711− ?- s
6712− [%face *] (nested-import-invalid shape.s state)
6713− [%bare *] (nested-import-invalid shape.s state)
6714− [%pun *] (nested-import-invalid [%ref at.s ~[name.s]] state)
6715− [%cell *] (nested-samples-invalid items.s env state)
6716− * ~
6717− ==
6718−::
6719−++ nested-samples-invalid
6720− |= [items=(list sample) env=ienv state=istate]
6721− ^- (unit idiag)
6722− ?~ items ~
6723− =/ head=isample-result (infer-sample i.items env state)
6724− ?: ?=(%| -.head) (sample-import-invalid i.items env state)
6725− $(items t.items, env env.p.head, state state.p.head)
6726::
5796::
6727++ infer-simple-shape
5797++ infer-simple-shape
6728 |= [sh=shape state=istate]
5798 |= [sh=shape state=istate]
6729 ^- (unit [typ=itype state=istate])
5799 ^- (unit [typ=itype state=istate])
6730 ?- -.sh
5800 ?- -.sh
6731− %hole `[[%var next.state] state(next +(next.state), holes [[next.state at.sh] holes.state])]
6732 %aura
5801 %aura
6733 ?: =(0 aura.sh) `[[%any-atom ~] state]
5802 ?: =(0 aura.sh) `[[%any-atom ~] state]
6734 `[[%atom aura.sh] state]
5803 `[[%atom aura.sh] state]
6735 %flag `[[%flag ~] state]
5804 %flag `[[%flag ~] state]
6736− %noun `[[%noun ~] state]
6737 %const
5805 %const
6738− ?. |(=(%term form.lit.sh) =(%null form.lit.sh) =(%loobean form.lit.sh)) ~
5806+ ?. |(=(%term form.lit.sh) =(%null form.lit.sh)) ~
6739− ?: &(=(%loobean form.lit.sh) !|(=(0 val.lit.sh) =(1 val.lit.sh))) ~
6740 `[[%const lit.sh] state]
5807 `[[%const lit.sh] state]
6741 %union
5808 %union
6742 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
5809 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
@@ -6761,7 +5828,7 @@
6761 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
5828 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
6762 ?~ found ~
5829 ?~ found ~
6763 ?^ vars.u.found ~
5830 ?^ vars.u.found ~
6764− `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
5831+ `[(itype-in-import typ.u.found u.iface i.t.names.sh) state]
6765 =/ found=(unit itype)
5832 =/ found=(unit itype)
6766 (find-imported-mold i.t.names.sh n externals.state surs.state)
5833 (find-imported-mold i.t.names.sh n externals.state surs.state)
6767 ?~ found ~
5834 ?~ found ~
@@ -6780,13 +5847,10 @@
6780 ?~ prelude-entry ~
5847 ?~ prelude-entry ~
6781 ?^ vars.u.prelude-entry ~
5848 ?^ vars.u.prelude-entry ~
6782 `[typ.u.prelude-entry state]
5849 `[typ.u.prelude-entry state]
6783− =/ direct=(unit itype) (simple-source-recursive n u.found state)
6784− ?^ direct `[u.direct state]
6785 =/ out=(unit [typ=itype state=istate])
5850 =/ out=(unit [typ=itype state=istate])
6786 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
5851 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6787 ?~ out ~
5852 ?~ out ~
6788− ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6789− `[(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)]
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)]
6790 %apply
5854 %apply
6791 ?~ ref.sh ~
5855 ?~ ref.sh ~
6792 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
5856 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
@@ -6801,7 +5865,7 @@
6801 ?~ vars.u.template ~
5865 ?~ vars.u.template ~
6802 =/ applied=(unit itype) (template-apply u.template types.u.args)
5866 =/ applied=(unit itype) (template-apply u.template types.u.args)
6803 ?~ applied ~
5867 ?~ applied ~
6804− `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
5868+ `[(itype-in-import u.applied u.iface i.t.ref.sh) state.u.args]
6805 ?: (lien active.state.u.args |=(x=term =(x n))) ~
5869 ?: (lien active.state.u.args |=(x=term =(x n))) ~
6806 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
5870 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
6807 ?~ found
5871 ?~ found
@@ -6814,27 +5878,24 @@
6814 ?~ applied ~
5878 ?~ applied ~
6815 `[u.applied state.u.args]
5879 `[u.applied state.u.args]
6816 ?. ?=(%generic -.u.found) ~
5880 ?. ?=(%generic -.u.found) ~
6817− =/ grec=(unit itype) (simple-source-generic-recursive n u.found types.u.args state.u.args)
6818− ?^ grec `[u.grec state.u.args]
6819 ?. (distinct-params vars.u.found) ~
5881 ?. (distinct-params vars.u.found) ~
6820 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
5882 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
6821 ?~ params ~
5883 ?~ params ~
6822 =/ out=(unit [typ=itype state=istate])
5884 =/ out=(unit [typ=itype state=istate])
6823 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
5885 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
6824 ?~ out ~
5886 ?~ out ~
6825− ?^ (unresolved-hole holes.state.u.out holes.state.u.args state.u.out) ~
6826 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
5887 ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6827 ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
5888 ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6828 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
5889 =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6829 (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
5890 (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6830− `[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)]
5891+ `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args)]
6831 %tvar
5892 %tvar
6832 =/ param=(unit itype) (iparam-lookup name.sh params.state)
5893 =/ param=(unit itype) (iparam-lookup name.sh params.state)
6833 ?^ param `[u.param state]
5894 ?^ param `[u.param state]
6834 ?: in-mold.state ~
5895 ?: in-mold.state ~
6835 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
5896 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
6836 ?^ n `[[%var u.n] state]
5897 ?^ n `[[%var u.n] state]
6837− `[[%var next.state] state(next +(next.state), caps [[name.sh next.state at.sh] caps.state])]
5898+ `[[%var next.state] state(next +(next.state), caps [[name.sh next.state] caps.state])]
6838 * ~
5899 * ~
6839 ==
5900 ==
6840::
5901::
@@ -6867,12 +5928,12 @@
6867 ^- isample-result
5928 ^- isample-result
6868 ?- -.s
5929 ?- -.s
6869 %bind
5930 %bind
6870− ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
5931+ ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6871 [%| "sample shadows a name"]
5932 [%| "sample shadows a name"]
6872 =/ t=itype [%var next.state]
5933 =/ t=itype [%var next.state]
6873 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
5934 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
6874 %face
5935 %face
6875− ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
5936+ ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6876 [%| "sample shadows a name"]
5937 [%| "sample shadows a name"]
6877 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
5938 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
6878 ?~ t [%| "sample mold is not supported by partial inference"]
5939 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -6910,8 +5971,8 @@
6910 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
5971 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
6911::
5972::
6912:: Local definitions generalize only variables outside their enclosing
5973:: Local definitions generalize only variables outside their enclosing
6913−:: environment and explicit-capital scope. Recursive gate groups use
5974+:: environment and explicit-capital scope. Unresolved groups stay
6914−:: monomorphic placeholders while their bodies are checked.
5975+:: unsupported: this fragment does not infer recursive definitions.
6915::
5976::
6916+$ ilocal-result (each [env=ienv state=istate] idiag)
5977+$ ilocal-result (each [env=ienv state=istate] idiag)
6917++ free-env-vars
5978++ free-env-vars
@@ -6940,7 +6001,6 @@
6940 |-
6001 |-
6941 ?~ ds &
6002 ?~ ds &
6942 ?: ?=(%mold -.i.ds) $(ds t.ds)
6003 ?: ?=(%mold -.i.ds) $(ds t.ds)
6943− ?: =(name.i.ds %proj) |
6944 ?. (unique-value-name name.i.ds names) |
6004 ?. (unique-value-name name.i.ds names) |
6945 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6005 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6946 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
6006 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -6964,7 +6024,6 @@
6964 |-
6024 |-
6965 ?~ locals &
6025 ?~ locals &
6966 =/ n=term name.i.locals
6026 =/ n=term name.i.locals
6967− ?: =(n %proj) |
6968 ?. (unique-value-name n names) |
6027 ?. (unique-value-name n names) |
6969 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6028 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6970 ?: (lien marks.state |=(m=term =(n m))) |
6029 ?: (lien marks.state |=(m=term =(n m))) |
@@ -6982,145 +6041,6 @@
6982 ?~ inferred |
6041 ?~ inferred |
6983 $(locals t.locals)
6042 $(locals t.locals)
6984::
6043::
6985−:: Gather written capitals belonging to one ++. Nested local definitions
6986−:: establish their own scopes; inline gates remain in the enclosing scope.
6987−+$ icap-site [name=@t at=span]
6988−++ scope-shape
6989− |= s=shape
6990− ^- (list icap-site)
6991− ?- -.s
6992− %tvar ~[[name.s at.s]]
6993− %apply (zing (turn args.s scope-shape))
6994− %cell (zing (turn fields.s scope-field))
6995− %union (zing (turn cases.s scope-shape))
6996− %fn (weld (scope-shape sample.s) (scope-shape product.s))
6997− %generic
6998− =/ inside=(list icap-site) (scope-shape body.s)
6999− (skim inside |=(site=icap-site !(lien vars.s |=(v=@t =(v name.site)))))
7000− * ~
7001− ==
7002−::
7003−++ scope-field
7004− |= f=field
7005− ^- (list icap-site)
7006− ?- -.f
7007− %face (scope-shape shape.f)
7008− %bare (scope-shape shape.f)
7009− %pun ~
7010− ==
7011−::
7012−++ scope-sample
7013− |= s=sample
7014− ^- (list icap-site)
7015− ?- -.s
7016− %face (scope-shape shape.s)
7017− %bare (scope-shape shape.s)
7018− %cell (zing (turn items.s scope-sample))
7019− * ~
7020− ==
7021−::
7022−++ scope-pieces
7023− |= ps=(list piece)
7024− ^- (list icap-site)
7025− ?~ ps ~
7026− =/ first=(list icap-site)
7027− ?- -.i.ps
7028− %expr (scope-expr p.i.ps)
7029− %text ~
7030− ==
7031− (weld first $(ps t.ps))
7032−::
7033−++ scope-qsegs
7034− |= ps=(list qseg)
7035− ^- (list icap-site)
7036− ?~ ps ~
7037− =/ first=(list icap-site)
7038− ?- -.i.ps
7039− %expr (scope-expr p.i.ps)
7040− %knot ~
7041− ==
7042− (weld first $(ps t.ps))
7043−::
7044−++ scope-edits
7045− |= xs=(list edit)
7046− ^- (list icap-site)
7047− ?~ xs ~
7048− =/ first=(list icap-site) (scope-expr val.i.xs)
7049− (weld first $(xs t.xs))
7050−::
7051−++ scope-items
7052− |= xs=(list item)
7053− ^- (list icap-site)
7054− ?~ xs ~
7055− =/ first=(list icap-site) (scope-expr val.i.xs)
7056− (weld first $(xs t.xs))
7057−::
7058−++ scope-arms
7059− |= xs=(list arm)
7060− ^- (list icap-site)
7061− ?~ xs ~
7062− =/ first=(list icap-site) (scope-expr val.i.xs)
7063− (weld first $(xs t.xs))
7064−::
7065−++ scope-exprs
7066− |= xs=(list expr)
7067− ^- (list icap-site)
7068− ?~ xs ~
7069− =/ first=(list icap-site) (scope-expr i.xs)
7070− (weld first $(xs t.xs))
7071−::
7072−++ scope-expr
7073− |= e=expr
7074− ^- (list icap-site)
7075− ?- -.e
7076− %str (scope-pieces pieces.e)
7077− %qath (scope-qsegs segs.e)
7078− %change (scope-edits edits.e)
7079− %pair (scope-expr val.e)
7080− %unit (scope-expr val.e)
7081− %group (scope-expr inner.e)
7082− %list (scope-exprs items.e)
7083− %tuple (scope-items items.e)
7084− %gate
7085− =/ first=(list icap-site) (scope-sample sample.e)
7086− =/ last=(list icap-site) (scope-expr body.e)
7087− (weld first last)
7088− %gate-wide
7089− =/ first=(list icap-site) (scope-sample sample.e)
7090− =/ last=(list icap-site) (scope-expr body.e)
7091− (weld first last)
7092− %call
7093− =/ first=(list icap-site) (scope-expr head.e)
7094− =/ last=(list icap-site) (scope-exprs args.e)
7095− (weld first last)
7096− %cast
7097− =/ first=(list icap-site) (scope-shape shape.e)
7098− =/ last=(list icap-site) (scope-expr val.e)
7099− (weld first last)
7100− %trace
7101− =/ first=(list icap-site) (scope-expr val.e)
7102− =/ last=(list icap-site) (scope-expr then.e)
7103− (weld first last)
7104− %branch
7105− =/ first=(list icap-site) (scope-expr subject.e)
7106− =/ last=(list icap-site) (scope-arms arms.e)
7107− (weld first last)
7108− %body (scope-expr final.e)
7109− * ~
7110− ==
7111−::
7112−++ reserve-cap-sites
7113− |= [sites=(list icap-site) state=istate]
7114− ^- istate
7115− ?~ sites state
7116− ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
7117− $(sites t.sites, state state(next +(next.state), caps [[name.i.sites next.state at.i.sites] caps.state]))
7118−::
7119−++ reserve-def-caps
7120− |= [e=expr state=istate]
7121− ^- istate
7122− (reserve-cap-sites (scope-expr e) state)
7123−::
7124++ infer-local-defs
6044++ infer-local-defs
7125 |= [ds=(list def) env=ienv state=istate]
6045 |= [ds=(list def) env=ienv state=istate]
7126 ^- ilocal-result
6046 ^- ilocal-result
@@ -7129,66 +6049,26 @@
7129 |-
6049 |-
7130 ?~ ds
6050 ?~ ds
7131 ?~ remaining [%& env state]
6051 ?~ remaining [%& env state]
7132− ?. progressed
7133− =/ pending=(list def) (flop remaining)
7134− =/ groups=icomponents (graph-components pending (global-value-names pending))
7135− =/ grouped=(unit [rest=(list def) env=ienv state=istate])
7136− (try-local-group pending groups env state)
7137− ?~ grouped [%| ["local definitions need unsupported inference" ~]]
6052+ ?. progressed [%| ["local definitions need unsupported inference" ~]]
7138− $(ds rest.u.grouped, remaining ~, env env.u.grouped, state state.u.grouped, progressed |)
7139 $(ds (flop remaining), remaining ~, progressed |)
6053 $(ds (flop remaining), remaining ~, progressed |)
7140 =/ d=def i.ds
6054 =/ d=def i.ds
7141 ?> ?=(%value -.d)
6055 ?> ?=(%value -.d)
7142− =/ local-state=istate (reserve-def-caps val.d state)
7143− =/ inferred=iresult (infer-fragment val.d env local-state)
6056+ =/ inferred=iresult (infer-fragment val.d env state)
7144− =/ retried=? ?=(%| -.inferred)
7145− =? inferred retried (infer-recursive-gate d env local-state)
7146 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
6057 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
7147− =. state.p.inferred (promote-restricted-numbers state.p.inferred env)
7148− =. 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)))
7149− =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
7150− ?^ hole [%| u.hole]
7151− =/ merged=(unit [first=icap second=icap])
7152− (merged-capitals caps.state.p.inferred sub.state.p.inferred)
7153− ?^ merged
7154− [%| ["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"]]]]
7155− ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred)
7156− [%| ["explicit capital constraints are not supported by partial inference" ~]]
7157 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
6058 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
7158 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
6059 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
7159 $(ds t.ds, remaining [d remaining])
6060 $(ds t.ds, remaining [d remaining])
7160 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
6061 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
7161 $(ds t.ds, remaining [d remaining])
6062 $(ds t.ds, remaining [d remaining])
7162 =/ free=(list @ud)
6063 =/ free=(list @ud)
7163− (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
6064+ (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state.p.inferred sub.state.p.inferred))
7164 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6065 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7165 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
6066 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
7166− $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
6067+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred, progressed &)
7167−::
7168−:: Try complete cyclic local groups after individual definitions stall.
7169−:: Components with non-gates or unresolved constraints stay unavailable.
7170−::
7171−++ try-local-group
7172− |= [ds=(list def) groups=icomponents env=ienv state=istate]
7173− ^- (unit [rest=(list def) env=ienv state=istate])
7174− ?~ groups ~
7175− =/ names=(list term) i.groups
7176− ?. (gth (lent names) 1) $(groups t.groups)
7177− =/ members=(list def)
7178− (skim ds |=(d=def &(?=(%value -.d) (lien names |=(n=term =(n name.d))))))
7179− ?. =((lent members) (lent names)) $(groups t.groups)
7180− =/ result=ilocal-result (infer-gate-group members env state)
7181− ?: ?=(%| -.result) $(groups t.groups)
7182− =/ rest=(list def)
7183− (skim ds |=(d=def !(lien names |=(n=term =(n name.d)))))
7184− =/ more=(unit [rest=(list def) env=ienv state=istate])
7185− $(ds rest, groups t.groups, env env.p.result, state state.p.result)
7186− ?^ more more
7187− `[rest env.p.result state.p.result]
7188::
6068::
7189:: Read only fields of a known record. Unresolved field constraints and
6069:: Read only fields of a known record. Unresolved field constraints and
7190−:: ambiguous repeated faces are outside this fragment. Imported record
6070+:: ambiguous repeated faces are outside this fragment (doc question:
7191−:: spines with repeated names are unavailable when used.
6071+:: whether duplicate imported Hoon faces are valid or select a field).
7192::
6072::
7193++ record-fields-named
6073++ record-fields-named
7194 |= [name=term t=itype sub=isub]
6074 |= [name=term t=itype sub=isub]
@@ -7207,33 +6087,21 @@
7207 ^- iresult
6087 ^- iresult
7208 =/ reverse=(list term) (flop names)
6088 =/ reverse=(list term) (flop names)
7209 ?~ reverse [%| ["empty wing" ~]]
6089 ?~ reverse [%| ["empty wing" ~]]
7210− =/ iface=(unit ifile) (find-jibb-interface i.reverse jimports.state)
6090+ =/ scheme=(unit ischeme) (ienv-lookup i.reverse env)
6091+ ?~ scheme [%| ["field access is not supported by partial inference" ~]]
6092+ =/ inst=[typ=itype state=istate] (instantiate-scheme u.scheme state)
7211 =/ fields=(list term) t.reverse
6093 =/ fields=(list term) t.reverse
7212− ?~ fields [%| ["field access is not supported by partial inference" ~]]
7213− =/ scheme=(unit ischeme)
7214− ?~ iface
7215− (ienv-lookup i.reverse env)
7216− (ienv-lookup i.fields values.u.iface)
7217− ?~ scheme
7218− ?^ iface [%| ["module member is not available to partial inference" ~]]
7219− [%| ["field access is not supported by partial inference" ~]]
7220− =/ inst=[typ=itype state=istate]
7221− ?~ iface (instantiate-scheme u.scheme state)
7222− =/ imported=ischeme u.scheme
7223− =. typ.imported (itype-in-import typ.imported u.iface i.reverse prelude.state)
7224− (instantiate-scheme imported state)
7225− =/ remaining=(list term) ?~(iface fields t.fields)
7226 =/ typ=itype typ.inst
6094 =/ typ=itype typ.inst
7227 |-
6095 |-
7228− ?~ remaining [%& typ state.inst]
6096+ ?~ fields [%& typ state.inst]
7229− =/ found=(list itype) (record-fields-named i.remaining typ sub.state.inst)
6097+ =/ found=(list itype) (record-fields-named i.fields typ sub.state.inst)
7230 ?~ found [%| ["field is not available to partial inference" ~]]
6098 ?~ found [%| ["field is not available to partial inference" ~]]
7231 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
6099 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
7232− $(remaining t.remaining, typ i.found)
6100+ $(fields t.fields, typ i.found)
7233::
6101::
7234−:: Propagate a known union or list through supported loobean, unit and list
6102+:: Propagate a known union through supported loobean and unit branches. Empty bodies
7235−:: branches. Empty bodies and groups are transparent; bodies with definitions
6103+:: and groups are transparent; bodies with definitions keep their normal
7236−:: keep their normal scoping and wait for general bidirectional inference.
6104+:: scoping and wait for general bidirectional inference.
7237::
6105::
7238++ context-union-branch
6106++ context-union-branch
7239 |= e=expr
6107 |= e=expr
@@ -7250,8 +6118,6 @@
7250 ^- iresult
6118 ^- iresult
7251 ?: ?=(%group -.e) $(e inner.e)
6119 ?: ?=(%group -.e) $(e inner.e)
7252 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6120 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
7253− ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
7254− (infer-list-context e expected env state context)
7255 ?: ?=(%branch -.e)
6121 ?: ?=(%branch -.e)
7256 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6122 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
7257 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
6123 ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
@@ -7268,9 +6134,6 @@
7268 [%| ["branch does not cover both loobeans" ~]]
6134 [%| ["branch does not cover both loobeans" ~]]
7269 =/ subject=iresult (infer-fragment subject.e env state)
6135 =/ subject=iresult (infer-fragment subject.e env state)
7270 ?: ?=(%| -.subject) subject
6136 ?: ?=(%| -.subject) subject
7271− =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
7272− ?: ?=(%union -.subject-type)
7273− [%| ["contextual union-pattern branch is not supported by partial inference" ~]]
7274 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6137 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
7275 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6138 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
7276 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
6139 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -7282,33 +6145,20 @@
7282 ?: ?=(%| -.value) value
6145 ?: ?=(%| -.value) value
7283 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
6146 =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7284 ?: ?=(%unknown -.fit)
6147 ?: ?=(%unknown -.fit)
7285− ?: &(?=(%collection -.expected) =(%list name.expected))
7286− [%| ["branch list constraint is not supported by partial inference" ~]]
7287− ?: ?=(%flag -.expected) [%| ["branch loobean constraint is not supported by partial inference" ~]]
7288 [%| ["branch union constraint is not supported by partial inference" ~]]
6148 [%| ["branch union constraint is not supported by partial inference" ~]]
7289 ?: ?=(%bad -.fit)
6149 ?: ?=(%bad -.fit)
7290− =/ missing=(unit idiag) (missing-union-tag e expected sub.state.p.value context)
7291− ?^ missing [%| u.missing]
7292− =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
7293− ?^ nested [%| u.nested]
7294− ?: &(?=(%collection -.expected) =(%list name.expected))
7295− [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
7296− ?: ?=(%flag -.expected)
7297− [%| ["branch arm does not fit its expected loobean" ~[[context "expected loobean"] [(span-of e) "branch arm"]]]]
7298 [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
6150 [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
7299 [%& expected state.p.value(sub sub.fit, next next.fit)]
6151 [%& expected state.p.value(sub sub.fit, next next.fit)]
7300::
6152::
7301−:: A list expression needs a known list target and the validated prelude list.
6153+:: A list literal needs a known list target and the validated prelude list.
7302−:: Literal items and unfaced two-item cons cells receive that target one by
7303−:: one; pending constraints elsewhere stay in the threaded state.
6154+:: Its items receive that target one by one; pending constraints elsewhere
6155+:: stay in the threaded state. Other list syntax remains unsupported.
7304::
6156::
7305−++ context-list-expression
6157+++ context-list-literal
7306 |= e=expr
6158 |= e=expr
7307 ^- ?
6159 ^- ?
7308 ?- -.e
6160 ?- -.e
7309 %list &
6161 %list &
7310− %tuple &
7311− %lit |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
7312 %group $(e inner.e)
6162 %group $(e inner.e)
7313 %body ?~(defs.e $(e final.e) |)
6163 %body ?~(defs.e $(e final.e) |)
7314 * |
6164 * |
@@ -7319,6 +6169,7 @@
7319 ^- iresult
6169 ^- iresult
7320 ?: ?=(%group -.e) $(e inner.e)
6170 ?: ?=(%group -.e) $(e inner.e)
7321 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6171 ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
6172+ ?> ?=(%list -.e)
7322 ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
6173 ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
7323 ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
6174 ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7324 [%| ["list literal needs the standard prelude in partial inference" ~]]
6175 [%| ["list literal needs the standard prelude in partial inference" ~]]
@@ -7331,65 +6182,25 @@
7331 ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
6182 ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
7332 ?~ args.target [%| ["list context is not supported by partial inference" ~]]
6183 ?~ args.target [%| ["list context is not supported by partial inference" ~]]
7333 ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
6184 ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
7334− ?: ?=(%lit -.e)
7335− ?. |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
7336− [%| ["list expression is not supported by partial inference" ~]]
7337− [%& target state]
7338− ?: ?=(%list -.e)
7339− =/ result=iresult (infer-list-items items.e i.args.target env state context)
6185+ =/ result=iresult (infer-list-items items.e i.args.target env state context)
7340− ?: ?=(%| -.result) result
6186+ ?: ?=(%| -.result) result
7341− [%& target state.p.result]
6187+ [%& target state.p.result]
7342− ?. ?=(%tuple -.e) [%| ["list expression is not supported by partial inference" ~]]
7343− ?~ items.e [%| ["cons shape is not supported by partial inference" ~]]
7344− ?~ t.items.e [%| ["cons shape is not supported by partial inference" ~]]
7345− ?^ t.t.items.e [%| ["cons shape is not supported by partial inference" ~]]
7346− ?^ face.i.items.e [%| ["faced cons is not supported by partial inference" ~]]
7347− ?^ face.i.t.items.e [%| ["faced cons is not supported by partial inference" ~]]
7348− =/ head=iresult (infer-list-items ~[val.i.items.e] i.args.target env state context)
7349− ?: ?=(%| -.head) head
7350− =/ target=itype (itype-walk target sub.state.p.head)
7351− =/ tail=iresult
7352− ?: (context-list-expression val.i.t.items.e)
7353− (infer-list-context val.i.t.items.e target env state.p.head context)
7354− (infer-fragment val.i.t.items.e env state.p.head)
7355− ?: ?=(%| -.tail) tail
7356− =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
7357− ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
7358− ?: ?=(%bad -.fit)
7359− [%| ["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)]]]]
7360− [%& target state.p.tail(sub sub.fit, next next.fit)]
7361−::
7362−++ infer-open-list-items
7363− |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7364− ^- iresult
7365− ?~ items [%& expected state]
7366− =/ target=itype (itype-walk expected sub.state)
7367− =/ value=iresult (infer-call-context-arg i.items target env state context)
7368− ?: ?=(%| -.value) value
7369− =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7370− ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
7371− ?: ?=(%bad -.fit)
7372− ?: |((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))
7373− [%| ["list item widening is not supported by partial inference" ~]]
7374− [%| ["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)]]]]
7375− ?: (itype-has-tag (itype-normalize expected sub.fit))
7376− [%| ["list item needs context in partial inference" ~]]
7377− $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7378::
6188::
7379++ infer-list-items
6189++ infer-list-items
7380 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
6190 |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7381 ^- iresult
6191 ^- iresult
7382 ?~ items [%& expected state]
6192 ?~ items [%& expected state]
7383 =/ target=itype (itype-walk expected sub.state)
6193 =/ 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))
7384− =/ value=iresult (infer-call-context-arg i.items target env state context)
6198+ (infer-list-context i.items target env state context)
6199+ (infer-fragment i.items env state)
7385 ?: ?=(%| -.value) value
6200 ?: ?=(%| -.value) value
7386 =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
6201 =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7387 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
6202 ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
7388 ?: ?=(%bad -.fit)
6203 ?: ?=(%bad -.fit)
7389− =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
7390− ?^ missing [%| u.missing]
7391− =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
7392− ?^ nested [%| u.nested]
7393 [%| ["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)]]]]
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)]]]]
7394 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
6205 $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7395::
6206::
@@ -7482,7 +6293,7 @@
7482 [%| ["list branch pattern is not supported by partial inference" ~]]
6293 [%| ["list branch pattern is not supported by partial inference" ~]]
7483 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
6294 =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
7484 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
6295 ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
7485− ?: |(=(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)))))
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)))))
7486 [%| ["pattern binder shadows a name" ~]]
6297 [%| ["pattern binder shadows a name" ~]]
7487 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
6298 =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
7488 =/ left=iresult
6299 =/ left=iresult
@@ -7519,7 +6330,7 @@
7519 [%| ["unit branch pattern is not supported by partial inference" ~]]
6330 [%| ["unit branch pattern is not supported by partial inference" ~]]
7520 =/ binder=(unit term) ?:(first-empty second-name first-name)
6331 =/ binder=(unit term) ?:(first-empty second-name first-name)
7521 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
6332 ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
7522− ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
6333+ ?: |(?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
7523 [%| ["pattern binder shadows a name" ~]]
6334 [%| ["pattern binder shadows a name" ~]]
7524 =/ payload=(unit itype) (unit-union-payload typ)
6335 =/ payload=(unit itype) (unit-union-payload typ)
7525 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
6336 ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
@@ -7537,628 +6348,10 @@
7537 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
6348 ?~ joined [%| ["unit branch results need unsupported inference" ~]]
7538 [%& typ.p.left state.p.right(sub u.joined)]
6349 [%& typ.p.left state.p.right(sub u.joined)]
7539::
6350::
7540−:: Infer pieces in order, retaining their substitutions and pending tags.
6351+++ infer-fragment
7541−:: A bare decimal literal has no outside type constraint, so it takes its
7542−:: normal @ud default here. Other open numeric and aura variables wait for
7543−:: deferred constraints, which this fragment does not implement yet.
7544−++ infer-string-pieces
7545− |= [ps=(list piece) env=ienv state=istate]
6352+ |= [e=expr env=ienv state=istate]
7546 ^- iresult
6353 ^- iresult
7547− ?~ ps [%& [%atom %t] state]
6354+ ?- -.e
7548− ?: ?=(%text -.i.ps) $(ps t.ps)
7549− =/ item=iresult (infer-fragment p.i.ps env state)
7550− ?: ?=(%| -.item) item
7551− =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
7552− ?: |(?=(%atom -.t) ?=(%any-atom -.t))
7553− $(ps t.ps, state state.p.item)
7554− ?: &(|(?=(%nvar -.t) ?=(%rnvar -.t)) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
7555− $(ps t.ps, state state.p.item)
7556− ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
7557− $(ps t.ps, state state.p.item)
7558− ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7559− [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7560− ?: &(?=(%rvar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7561− [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7562− ?: ?=(%cell -.t)
7563− [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
7564− [%| ["interpolation type needs unsupported inference" ~]]
7565−::
7566−:: Whole-case coverage for a known union. When a pattern may cover only
7567−:: part of a case, finite loobean refinements are tried below; other
7568−:: partial coverage stays unsupported until the general pattern matrix.
7569−+$ imatch ?(%full %none %unknown)
7570−++ union-pattern-items
7571− |= [ps=(list pattern) t=itype]
7572− ^- imatch
7573− ?~ ps %unknown
7574− ?~ t.ps (union-pattern i.ps t)
7575− =. t ?:(?=(%face -.t) body.t t)
7576− ?. ?=(%cell -.t)
7577− ?: |(?=(%atom -.t) ?=(%any-atom -.t) ?=(%flag -.t) ?=(%const -.t)) %none
7578− %unknown
7579− =/ a=imatch (union-pattern i.ps hed.t)
7580− =/ b=imatch $(ps t.ps, t tal.t)
7581− ?: |(=(%none a) =(%none b)) %none
7582− ?:(&(=(%full a) =(%full b)) %full %unknown)
7583−::
7584−++ union-pattern
7585− |= [p=pattern t=itype]
7586− ^- imatch
7587− =. t ?:(?=(%face -.t) body.t t)
7588− ?- -.p
7589− %any %full
7590− %bind %full
7591− %lit
7592− ?: ?=(%const -.t) ?:(=(val.literal.t val.lit.p) %full %none)
7593− ?: ?=(%cell -.t) %none
7594− ?: ?=(%flag -.t)
7595− ?:(|(=(0 val.lit.p) =(1 val.lit.p)) %unknown %none)
7596− %unknown
7597− %str ?:(?=(%cell -.t) %none %unknown)
7598− %cell (union-pattern-items items.p t)
7599− ==
7600−::
7601−++ union-pattern-has-bind
7602− |= p=pattern
7603− ^- ?
7604− ?: ?=(%bind -.p) &
7605− ?. ?=(%cell -.p) |
7606− (lien items.p union-pattern-has-bind)
7607−::
7608−++ union-pattern-bind-items
7609− |= [ps=(list pattern) t=itype env=ienv globals=(list term)]
7610− ^- (unit ienv)
7611− ?~ ps ~
7612− ?~ t.ps (union-pattern-bind i.ps t env globals)
7613− =. t ?:(?=(%face -.t) body.t t)
7614− ?. ?=(%cell -.t) ~
7615− =/ first=(unit ienv) (union-pattern-bind i.ps hed.t env globals)
7616− ?~ first ~
7617− $(ps t.ps, t tal.t, env u.first)
7618−::
7619−++ union-pattern-bind
7620− |= [p=pattern t=itype env=ienv globals=(list term)]
7621− ^- (unit ienv)
7622− =. t ?:(?=(%face -.t) body.t t)
7623− ?: ?=(%bind -.p)
7624− ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
7625− `[[name.p [t ~]] env]
7626− ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
7627− `env
7628−::
7629−:: Split loobean fields into finite refinements for partial patterns.
7630−:: Keep original cases for binder types and preserve whole-case matching
7631−:: before trying refinements. Cap products at 64; unknown, empty or opaque
7632−:: shapes stay unsupported rather than implying complete pattern checking.
7633−+$ ifinite [origin=@ud base=itype part=itype]
7634−++ finite-product
7635− |= [hs=(list itype) ts=(list itype) out=(list itype)]
7636− ^- (list itype)
7637− ?~ hs out
7638− =/ rows=(list itype) (turn ts |=(t=itype [%cell i.hs t]))
7639− $(hs t.hs, out (weld rows out))
7640−::
7641−++ finite-type
7642− |= t=itype
7643− ^- (unit (list itype))
7644− ?- -.t
7645− %flag
7646− `~[[%const [%loobean %f 0 '%.y']] [%const [%loobean %f 1 '%.n']]]
7647− %face
7648− =/ body=(unit (list itype)) $(t body.t)
7649− ?~ body ~
7650− `(turn u.body |=(x=itype [%face name.t x]))
7651− %cell
7652− =/ hed=(unit (list itype)) $(t hed.t)
7653− ?~ hed ~
7654− =/ tal=(unit (list itype)) $(t tal.t)
7655− ?~ tal ~
7656− ?: (gth (mul (lent u.hed) (lent u.tal)) 64) ~
7657− `(finite-product u.hed u.tal ~)
7658− * `~[t]
7659− ==
7660−::
7661−++ finite-cases
7662− |= [xs=(list itype) out=(list ifinite) origin=@ud]
7663− ^- (unit (list ifinite))
7664− ?~ xs `out
7665− =/ parts=(unit (list itype)) (finite-type i.xs)
7666− ?~ parts ~
7667− ?: (gth (add (lent out) (lent u.parts)) 64) ~
7668− =/ rows=(list ifinite) (turn u.parts |=(t=itype [origin i.xs t]))
7669− $(xs t.xs, out (weld out rows), origin +(origin))
7670−::
7671−++ infer-known-union-whole
7672− |= [e=expr env=ienv subject=iresult]
7673− ^- (unit iresult)
7674− ?> ?=(%branch -.e)
7675− ?: ?=(%| -.subject) `subject
7676− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7677− ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7678− =/ cases=(list itype) cases.typ
7679− =/ remaining=(list itype) cases
7680− =/ arms=(list arm) arms.e
7681− =/ st=istate state.p.subject
7682− =/ answer=(unit itype) ~
7683− |-
7684− ?~ arms
7685− ?^ remaining
7686− `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7687− ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7688− `[%& u.answer st]
7689− =/ a=arm i.arms
7690− ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7691− ~
7692− =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7693− ?~ matching
7694− ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7695− `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7696− `[%| ["union pattern is not supported by partial inference" ~]]
7697− ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7698− `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7699− =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7700− ?~ bound `[%| ["pattern binder shadows a name" ~]]
7701− =/ body=iresult (infer-fragment val.a u.bound st)
7702− ?: ?=(%| -.body) `body
7703− =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7704− =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7705− ?: mismatch `[%| ["union branch result matching needs unsupported inference" ~]]
7706− $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
7707−::
7708−++ infer-known-union-context-whole
7709− |= [e=expr expected=itype env=ienv subject=iresult context=span]
7710− ^- (unit iresult)
7711− ?> ?=(%branch -.e)
7712− ?: ?=(%| -.subject) `subject
7713− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7714− ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7715− =/ cases=(list itype) cases.typ
7716− =/ remaining=(list itype) cases
7717− =/ arms=(list arm) arms.e
7718− =/ st=istate state.p.subject
7719− =/ answer=(unit itype) ~
7720− |-
7721− ?~ arms
7722− ?^ remaining
7723− `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7724− ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7725− `[%& expected st]
7726− =/ a=arm i.arms
7727− ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7728− ~
7729− =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7730− ?~ matching
7731− ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7732− `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7733− `[%| ["union pattern is not supported by partial inference" ~]]
7734− ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7735− `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7736− =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7737− ?~ bound `[%| ["pattern binder shadows a name" ~]]
7738− =/ body=iresult (infer-call-context-arg val.a expected u.bound st context)
7739− ?: ?=(%| -.body) `body
7740− =/ fit=ifit (itype-fit typ.p.body expected sub.state.p.body next.state.p.body)
7741− ?: ?=(%unknown -.fit) `[%| ["union branch result constraint is not supported by partial inference" ~]]
7742− ?: ?=(%bad -.fit)
7743− =/ missing=(unit idiag) (missing-union-tag val.a expected sub.state.p.body context)
7744− ?^ missing `[%| u.missing]
7745− =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body expected sub.state.p.body next.state.p.body context)
7746− ?^ nested `[%| u.nested]
7747− `[%| ["union branch arm does not fit its expected type" ~[[context "expected type"] [(span-of val.a) "branch arm"]]]]
7748− ?: (itype-has-tag (itype-normalize expected sub.fit))
7749− `[%| ["union branch result needs context in partial inference" ~]]
7750− $(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)
7751−::
7752−++ infer-known-union-finite
7753− |= [e=expr env=ienv subject=iresult expected=(unit [typ=itype context=span])]
7754− ^- iresult
7755− ?> ?=(%branch -.e)
7756− ?: ?=(%| -.subject) subject
7757− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7758− ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7759− =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
7760− ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
7761− =/ cases=(list ifinite) u.expanded
7762− =/ remaining=(list ifinite) cases
7763− =/ arms=(list arm) arms.e
7764− =/ st=istate state.p.subject
7765− =/ answer=(unit itype) ~
7766− |-
7767− ?~ arms
7768− ?^ remaining
7769− [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
7770− ?~ answer [%| ["empty union branch is not supported by partial inference" ~]]
7771− ?~ expected [%& u.answer st]
7772− [%& typ.u.expected st]
7773− =/ a=arm i.arms
7774− ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
7775− [%| ["partial union pattern is not supported by partial inference" ~]]
7776− =/ matching=(list ifinite) (skim remaining |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7777− ?~ matching
7778− ?: (lien cases |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7779− [%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7780− [%| ["union pattern is not supported by partial inference" ~]]
7781− ?: &((union-pattern-has-bind pat.a) (lien t.matching |=(c=ifinite !=(origin.c origin.i.matching))))
7782− [%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7783− =/ bound=(unit ienv) (union-pattern-bind pat.a base.i.matching env globals.st)
7784− ?~ bound [%| ["pattern binder shadows a name" ~]]
7785− =/ body=iresult
7786− ?~ expected (infer-fragment val.a u.bound st)
7787− (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7788− ?: ?=(%| -.body) body
7789− ?^ expected
7790− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7791− ?: ?=(%unknown -.fit) [%| ["union branch result constraint is not supported by partial inference" ~]]
7792− ?: ?=(%bad -.fit)
7793− =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7794− ?^ missing [%| u.missing]
7795− =/ 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)
7796− ?^ nested [%| u.nested]
7797− [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7798− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7799− [%| ["union branch result needs context in partial inference" ~]]
7800− $(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)
7801− =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7802− =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7803− ?: mismatch [%| ["union branch result matching needs unsupported inference" ~]]
7804− $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, answer `result)
7805−::
7806−:: Prove a one-arm record pattern covers a known, non-union subject.
7807−:: Variable or partial matches stay unsupported; binding uses the same
7808−:: scope and original payload types as the existing union matcher.
7809−++ single-structured-pattern
7810− |= e=expr
7811− ^- ?
7812− ?. ?=(%branch -.e) |
7813− ?~ arms.e |
7814− ?^ t.arms.e |
7815− =/ p=pattern pat.i.arms.e
7816− ?. ?=(%cell -.p) |
7817− !(levy items.p |=(x=pattern ?=(%bind -.x)))
7818−::
7819−++ infer-single-case-branch
7820− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7821− ^- iresult
7822− ?> (single-structured-pattern e)
7823− ?> ?=(%branch -.e)
7824− ?> ?=(^ arms.e)
7825− =/ a=arm i.arms.e
7826− =/ subject=iresult (infer-fragment subject.e env state)
7827− ?: ?=(%| -.subject) subject
7828− =/ st=istate state.p.subject
7829− =/ typ=itype (itype-normalize typ.p.subject sub.st)
7830− ?: ?=(%union -.typ) [%| ["single-case pattern needs unsupported inference" ~]]
7831− ?. =(%full (union-pattern pat.a typ))
7832− [%| ["single-case pattern needs unsupported inference" ~]]
7833− =/ bound=(unit ienv) (union-pattern-bind pat.a typ env globals.st)
7834− ?~ bound [%| ["pattern binder shadows a name" ~]]
7835− ?~ expected (infer-fragment val.a u.bound st)
7836− =/ body=iresult (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7837− ?: ?=(%| -.body) body
7838− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7839− ?: ?=(%unknown -.fit) [%| ["single-case branch result constraint is not supported by partial inference" ~]]
7840− ?: ?=(%bad -.fit)
7841− =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7842− ?^ missing [%| u.missing]
7843− =/ 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)
7844− ?^ nested [%| u.nested]
7845− [%| ["single-case branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7846− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7847− [%| ["single-case branch result needs context in partial inference" ~]]
7848− [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
7849−::
7850−:: This view is used only by pattern analysis, never exported or bound as
7851−:: the subject. Only null plus a two-binder/wildcard cell is supported; its
7852−:: tail keeps the original recursive type. Other patterns fail closed.
7853−++ jrec-match-view
7854− |= [e=expr subject=iresult]
7855− ^- iresult
7856− ?: ?=(%| -.subject) subject
7857− ?. ?=(%branch -.e) subject
7858− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7859− ?. ?=(%jrec -.typ) subject
7860− ?~ arms.e subject
7861− ?~ t.arms.e subject
7862− ?^ t.t.arms.e subject
7863− =/ x=pattern pat.i.arms.e
7864− =/ y=pattern pat.i.t.arms.e
7865− =/ empty=? &(?=(%lit -.x) =(%null form.lit.x))
7866− =/ full=pattern ?:(empty y x)
7867− ?. |(empty &(?=(%lit -.y) =(%null form.lit.y))) subject
7868− ?. ?=(%cell -.full) subject
7869− ?~ items.full subject
7870− ?~ t.items.full subject
7871− ?^ t.t.items.full subject
7872− ?. |(?=(%bind -.i.items.full) ?=(%any -.i.items.full)) subject
7873− ?. |(?=(%bind -.i.t.items.full) ?=(%any -.i.t.items.full)) subject
7874− ?: =(0 jrec-fuel.state.p.subject)
7875− [%| ["recursive mold unfolding needs unsupported inference" ~]]
7876− =/ nil=itype [%const [%null %n 0 '~']]
7877− =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
7878− [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
7879−::
7880−:: Experimental bounded, source-proven tree match. Only two explicit
7881−:: flat tag/binder patterns may consume the view: a whole-case binder
7882−:: must not leak the temporary structural representation.
7883−++ grec-simple-pattern
7884− |= [pat=pattern view=itype]
7885− ^- ?
7886− ?. ?=(%cell -.pat) |
7887− ?~ items.pat |
7888− =/ first=pattern i.items.pat
7889− ?. ?=(%lit -.first) |
7890− ?. =(%term form.lit.first) |
7891− =/ chosen=(unit itype) (contextual-tagged-case view val.lit.first ~)
7892− ?~ chosen |
7893− ?> ?=(%cell -.u.chosen)
7894− =/ rest=(list pattern) t.items.pat
7895− ?. (levy rest |=(p=pattern |(?=(%bind -.p) ?=(%any -.p)))) |
7896− ?: ?=(%cell -.tal.u.chosen) ?=([* [* ~]] rest)
7897− ?=([* ~] rest)
7898−++ grec-match-view
7899− |= [e=expr subject=iresult]
7900− ^- iresult
7901− ?: ?=(%| -.subject) subject
7902− ?. ?=(%branch -.e) subject
7903− ?. (grec-direct-context typ.p.subject sub.state.p.subject) subject
7904− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7905− ?. ?=(%grec -.typ) subject
7906− ?~ arms.e subject
7907− ?. |(?=(~ t.arms.e) ?=([* ~] t.arms.e)) subject
7908− =/ view=(unit [view=itype left=@ud]) (grec-unfold-view typ jrec-fuel.state.p.subject)
7909− ?~ view [%| ["recursive mold unfolding needs unsupported inference" ~]]
7910− ?. (grec-simple-pattern pat.i.arms.e view.u.view) subject
7911− =/ rest-ok=? ?~(t.arms.e & (grec-simple-pattern pat.i.t.arms.e view.u.view))
7912− ?. rest-ok subject
7913− [%& view.u.view state.p.subject(jrec-fuel left.u.view)]
7914−::
7915−:: A single-arm diagnostic only probes a direct, source-typed in-scope wing;
7916−:: other subjects retain the prior single-pattern inference path.
7917−++ grec-single-wing-subject
7918− |= [e=expr env=ienv state=istate]
7919− ^- (unit iresult)
7920− ?. ?=(%wing -.e) ~
7921− ?. ?=([@ ~] names.e) ~
7922− =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
7923− ?~ scheme ~
7924− ?. (grec-direct-context typ.u.scheme sub.state) ~
7925− `(infer-fragment e env state)
7926−::
7927−++ infer-known-union-branch-subject
7928− |= [e=expr env=ienv subject=iresult]
7929− ^- iresult
7930− =. subject (grec-match-view e subject)
7931− =. subject (jrec-match-view e subject)
7932− =/ whole=(unit iresult) (infer-known-union-whole e env subject)
7933− ?~ whole (infer-known-union-finite e env subject ~)
7934− u.whole
7935−::
7936−++ infer-known-union-branch
7937− |= [e=expr env=ienv state=istate]
7938− ^- iresult
7939− ?> ?=(%branch -.e)
7940− (infer-known-union-branch-subject e env (infer-fragment subject.e env state))
7941−::
7942−++ infer-known-union-context-subject
7943− |= [e=expr expected=itype env=ienv subject=iresult context=span]
7944− ^- iresult
7945− =. subject (grec-match-view e subject)
7946− =. subject (jrec-match-view e subject)
7947− =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
7948− ?~ whole (infer-known-union-finite e env subject `[expected context])
7949− u.whole
7950−::
7951−:: Limit speculative subject inference to wings and shallow calls;
7952−:: grouping is peeled linearly and cannot introduce a nested branch.
7953−++ simple-union-subject-arg
7954− |= e=expr
7955− ^- ?
7956− ?- -.e
7957− %wing &
7958− %lit &
7959− %str !(lien pieces.e |=(p=piece ?=(%expr -.p)))
7960− * |
7961− ==
7962−::
7963−++ safe-union-subject
7964− |= e=expr
7965− ^- ?
7966− ?: ?=(%group -.e) $(e inner.e)
7967− ?: ?=(%wing -.e) &
7968− ?. ?=(%call -.e) |
7969− ?. ?=(%wing -.head.e) |
7970− (levy args.e simple-union-subject-arg)
7971−::
7972−++ duplicate-loobean-arms
7973− |= e=expr
7974− ^- ?
7975− ?. ?=(%branch -.e) |
7976− ?~ arms.e |
7977− ?~ t.arms.e |
7978− ?^ t.t.arms.e |
7979− =/ x=pattern pat.i.arms.e
7980− =/ y=pattern pat.i.t.arms.e
7981− ?. &(?=(%lit -.x) ?=(%lit -.y)) |
7982− ?. &(=(%loobean form.lit.x) =(%loobean form.lit.y)) |
7983− =(val.lit.x val.lit.y)
7984−::
7985−++ union-subject-call
7986− |= e=expr
7987− ^- ?
7988− ?: ?=(%group -.e) $(e inner.e)
7989− ?=(%call -.e)
7990−::
7991−++ known-union-subject
7992− |= [e=expr env=ienv state=istate]
7993− ^- (unit iresult)
7994− ?. (safe-union-subject e) ~
7995− =/ subject=iresult (infer-fragment e env state)
7996− ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
7997− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7998− ?. |(?=(%union -.typ) ?=(%jrec -.typ) &(?=(%grec -.typ) (grec-direct-context typ.p.subject sub.state.p.subject))) ~
7999− `subject
8000−::
8001−::
8002−:: Infer changes only against a fully known record spine. Retain the
8003−:: target type; unknown spines and repeated edits remain unsupported.
8004−++ change-spine-known
8005− |= [t=itype sub=isub]
8006− ^- ?
8007− =. t (itype-walk t sub)
8008− ?: ?=(%face -.t) &
8009− ?. ?=(%cell -.t) |
8010− =/ first=itype (itype-walk hed.t sub)
8011− ?. ?=(%face -.first) |
8012− $(t tal.t)
8013−::
8014−++ infer-change-edits
8015− |= [edits=(list edit) target=itype env=ienv state=istate seen=(list term)]
8016− ^- iresult
8017− ?~ edits [%& target state]
8018− =/ entry=edit i.edits
8019− ?: (lien seen |=(name=term =(name name.entry)))
8020− [%| ["repeated change fields are not supported by partial inference" ~]]
8021− ?. (change-spine-known target sub.state)
8022− [%| ["change target needs a known record in partial inference" ~]]
8023− =/ found=(list itype) (record-fields-named name.entry target sub.state)
8024− ?~ found
8025− [%| ["record has no field `{(trip name.entry)}`" ~[[at.entry "unknown field"]]]]
8026− ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
8027− =/ expected=itype i.found
8028− =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
8029− ?: ?=(%| -.value) value
8030− =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
8031− ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
8032− ?: ?=(%bad -.fit)
8033− [%| ["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)]]]]
8034− $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
8035−::
8036−:: Backtick constructs the canonical prelude unit, after checking its
8037−:: prepared template has the standard null and [~ u=A] cases.
8038−++ standard-unit-template
8039− |= [template=ischeme at=path]
8040− ^- ?
8041− ?. =(at /lib/jibb/prelude/jibb) |
8042− ?~ vars.template |
8043− ?^ t.vars.template |
8044− =/ v=@ud i.vars.template
8045− =/ nil=itype [%const [%null %n 0 '~']]
8046− =/ expected=itype
8047− [%union ~[nil [%cell nil [%face %u [%var v]]]] `[at %unit] `%unit ~[[%var v]]]
8048− =(typ.template expected)
8049−::
8050−:: A named missing-case diagnostic needs more than a failed fit: a case
8051−:: with that tag but the wrong payload is not a missing case. Unknown
8052−:: shapes and atom types that accept terms keep the proof conservative.
8053−+$ itag-presence ?(%yes %no %maybe)
8054−++ tag-presence-cases
8055− |= [cases=(list itype) value=@ sub=isub]
8056− ^- itag-presence
8057− ?~ cases %no
8058− =/ first=itag-presence (tag-presence i.cases value sub)
8059− ?: =(%yes first) %yes
8060− =/ rest=itag-presence $(cases t.cases)
8061− ?: =(%yes rest) %yes
8062− ?: |(=(%maybe first) =(%maybe rest)) %maybe
8063− %no
8064−::
8065−++ tag-presence
8066− |= [t=itype value=@ sub=isub]
8067− ^- itag-presence
8068− =. t (itype-walk t sub)
8069− ?- -.t
8070− %const ?:(=(value val.literal.t) %yes %no)
8071− %flag ?:(|(=(value 0) =(value 1)) %yes %no)
8072− %atom ?:(|(=(%tas aura.t) =(%ta aura.t)) %maybe %no)
8073− %face $(t body.t)
8074− %cell
8075− =/ first=itag-presence $(t hed.t)
8076− ?: =(%yes first) %yes
8077− =/ rest=itag-presence $(t tal.t)
8078− ?: =(%yes rest) %yes
8079− ?: |(=(%maybe first) =(%maybe rest)) %maybe
8080− %no
8081− %union (tag-presence-cases cases.t value sub)
8082− * %maybe
8083− ==
8084−::
8085−++ missing-union-tag
8086− |= [e=expr expected=itype sub=isub context=span]
8087− ^- (unit idiag)
8088− ?. ?=(%lit -.e) ~
8089− ?. =(%term form.lit.e) ~
8090− =. expected (itype-walk expected sub)
8091− |-
8092− ?: ?=(%face -.expected) $(expected (itype-walk body.expected sub))
8093− ?. ?=(%union -.expected) ~
8094− ?. =(%no (tag-presence-cases cases.expected val.lit.e sub)) ~
8095− =/ label=tape
8096− ?~ label.expected "union {(show-itype expected sub)}"
8097− (show-itype expected sub)
8098− `["{label} has no case `{(trip txt.lit.e)}`" ~[[context "expected union"] [(span-of e) "tag"]]]
8099−::
8100−:: Locate a missing tag inside a syntactic tuple only by replaying the
8101−:: directional fit in source order. Uncertain or earlier failures stop
8102−:: the walk, preserving the generic diagnostic rather than guessing.
8103−++ nested-missing-tag
8104− |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
8105− ^- (unit idiag)
8106− =/ original=[left=itype right=itype] [actual expected]
8107− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
8108− =/ fit=ifit (itype-fit actual expected sub next)
8109− ?. ?=(%bad -.fit) ~
8110− =. actual (itype-walk actual sub)
8111− =. expected (itype-walk expected sub)
8112− ?: &(?=(%face -.actual) ?=(%face -.expected))
8113− ?. =(name.actual name.expected) ~
8114− $(actual body.actual, expected body.expected)
8115− ?: ?=(%face -.actual) $(actual body.actual)
8116− ?: ?=(%face -.expected) $(expected body.expected)
8117− =/ direct=(unit idiag) (missing-union-tag e expected sub context)
8118− ?^ direct direct
8119− ?. ?=(%tuple -.e) ~
8120− (nested-missing-items items.e actual expected sub next context)
8121−::
8122−++ nested-missing-items
8123− |= [items=(list item) actual=itype expected=itype sub=isub next=@ud context=span]
8124− ^- (unit idiag)
8125− ?~ items ~
8126− ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
8127− =/ original=[left=itype right=itype] [actual expected]
8128− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
8129− =. actual (itype-walk actual sub)
8130− =. expected (itype-walk expected sub)
8131− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8132− =/ first=ifit (itype-fit hed.actual hed.expected sub next)
8133− ?: ?=(%bad -.first)
8134− (nested-missing-tag val.i.items hed.actual hed.expected sub next context)
8135− ?. ?=(%ok -.first) ~
8136− $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8137−::
8138−:: A term-headed pair is the same noun as a two-item cell. Preserve the
8139−:: whole pair span for the synthetic head and the value's own span for
8140−:: the payload; unresolved term constraints follow ordinary cell inference.
8141−++ pair-as-cell
8142− |= e=expr
8143− ^- expr
8144− ?> ?=(%pair -.e)
8145− =/ head=expr [%lit at.e [%term %tas tag.e (crip ['%' (trip tag.e)])]]
8146− [%tuple at.e ~[[at.e ~ head] [(span-of val.e) ~ val.e]]]
8147−::
8148−:: A segment costs one shared step; dynamic segments are not handled yet.
8149−++ qath-static-fuel
8150− |= [segs=(list qseg) fuel=@ud]
8151− ^- (unit @ud)
8152− ?~ segs `fuel
8153− ?: =(0 fuel) ~
8154− ?. ?=(%knot -.i.segs) ~
8155− $(segs t.segs, fuel (dec fuel))
8156−::
8157−++ infer-fragment
8158− |= [e=expr env=ienv state=istate]
8159− ^- iresult
8160− ?- -.e
8161− %pair $(e (pair-as-cell e))
8162 %lit
6355 %lit
8163 ?- form.lit.e
6356 ?- form.lit.e
8164 %number ?: =(%ud aura.lit.e)
6357 %number ?: =(%ud aura.lit.e)
@@ -8172,45 +6365,10 @@
8172 %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
6365 %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
8173 %null [%& [%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])]
8174 ==
6367 ==
8175− %unit
6368+ %str
8176− ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
6369+ =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
8177− =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
8178− ?~ standard [%| ["unit construction needs the standard prelude in partial inference" ~]]
8179− ?. (standard-unit-template u.standard at.u.prelude.state)
8180− [%| ["unit construction needs the standard prelude in partial inference" ~]]
8181− =/ value=iresult $(e val.e)
8182− ?: ?=(%| -.value) value
8183− =/ result=(unit itype) (template-apply u.standard ~[typ.p.value])
8184− ?~ result [%| ["unit construction is not supported by partial inference" ~]]
6370+ ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
8185− [%& u.result state.p.value]
6371+ [%& [%atom %t] state]
8186− %list
8187− ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
8188− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
8189− [%| ["list literal needs the standard prelude in partial inference" ~]]
8190− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
8191− ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
8192− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
8193− [%| ["list literal needs the standard prelude in partial inference" ~]]
8194− =/ element=itype [%var next.state]
8195− =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
8196− ?: ?=(%| -.result) result
8197− [%& [%collection %list ~[element]] state.p.result]
8198− %str (infer-string-pieces pieces.e env state)
8199− %qath
8200− ?~ prelude.state [%| ["application path needs the standard prelude in partial inference" ~]]
8201− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
8202− [%| ["application path needs the standard prelude in partial inference" ~]]
8203− =/ standard=(unit ischeme) (find-jibb-mold %qath u.prelude.state)
8204− ?~ standard [%| ["application path needs the standard prelude in partial inference" ~]]
8205− ?. ?=(~ vars.u.standard) [%| ["application path mold needs unsupported inference" ~]]
8206− =/ typ=itype typ.u.standard
8207− ?. ?=(%jrec -.typ) [%| ["application path mold needs unsupported inference" ~]]
8208− ?. &(=(at.typ /lib/jibb/internal/jibb) =(%qath name.typ) =(%i head.typ) =(%ta aura.typ) =(%t tail.typ))
8209− [%| ["application path mold needs unsupported inference" ~]]
8210− ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8211− =/ remain=(unit @ud) (qath-static-fuel segs.e (dec jrec-fuel.state))
8212− ?~ remain [%| ["application path segments need unsupported inference" ~]]
8213− [%& typ state(jrec-fuel u.remain)]
8214 %wing
6372 %wing
8215 ?~ names.e [%| ["empty wing" ~]]
6373 ?~ names.e [%| ["empty wing" ~]]
8216 ?^ t.names.e
6374 ?^ t.names.e
@@ -8219,7 +6377,7 @@
8219 ?~ iface (infer-field-wing names.e env state)
6377 ?~ iface (infer-field-wing names.e env state)
8220 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
6378 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
8221 ?~ member [%| ["module member is not available to partial inference" ~]]
6379 ?~ member [%| ["module member is not available to partial inference" ~]]
8222− =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e prelude.state)
6380+ =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e)
8223 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
6381 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
8224 [%& typ.instance state.instance]
6382 [%& typ.instance state.instance]
8225 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
6383 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
@@ -8232,11 +6390,6 @@
8232 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
6390 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
8233 [%& typ.instance state.instance]
6391 [%& typ.instance state.instance]
8234 %group $(e inner.e)
6392 %group $(e inner.e)
8235− %change
8236− ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
8237− =/ target=iresult $(e [%wing at.e target.e])
8238− ?: ?=(%| -.target) target
8239− (infer-change-edits edits.e typ.p.target env state.p.target ~)
8240 %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
6393 %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
8241 %trace
6394 %trace
8242 =/ traced=iresult $(e val.e)
6395 =/ traced=iresult $(e val.e)
@@ -8253,9 +6406,6 @@
8253 [%| ["local molds shadow a name" ~]]
6406 [%| ["local molds shadow a name" ~]]
8254 =/ local-state=istate
6407 =/ local-state=istate
8255 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
6408 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
8256− =/ mold-hole=(unit span) (simple-local-mold-hole defs.e)
8257− ?^ mold-hole
8258− [%| ["type hole needs a determined type" ~[[u.mold-hole "unresolved type hole"]]]]
8259 ?. (local-molds-supported local-molds local-state)
6409 ?. (local-molds-supported local-molds local-state)
8260 [%| ["local molds need unsupported inference" ~]]
6410 [%| ["local molds need unsupported inference" ~]]
8261 =/ values=(list def) (local-value-defs defs.e)
6411 =/ values=(list def) (local-value-defs defs.e)
@@ -8266,32 +6416,20 @@
8266 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
6416 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
8267 %branch
6417 %branch
8268 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6418 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
8269− ?~ t.arms.e
8270− =/ single=(unit iresult) (grec-single-wing-subject subject.e env state)
8271− ?^ single (infer-known-union-branch-subject e env u.single)
8272− ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
8273− (infer-cell-branch e env state ~)
6419+ ?~ t.arms.e (infer-cell-branch e env state)
8274− ?^ t.t.arms.e (infer-known-union-branch e env state)
6420+ ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
8275− =/ known=(unit iresult) (known-union-subject subject.e env state)
8276− ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
8277− ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
8278− (infer-known-union-branch-subject e env u.known)
8279 =/ x=arm i.arms.e
6421 =/ x=arm i.arms.e
8280 =/ y=arm i.t.arms.e
6422 =/ y=arm i.t.arms.e
8281 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
6423 ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
8282 (infer-unit-branch e env state ~)
6424 (infer-unit-branch e env state ~)
8283− ?. ?=(%lit -.pat.x) (infer-known-union-branch e env state)
6425+ ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
8284− ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
6426+ ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
8285 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
6427 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
8286− (infer-known-union-branch e env state)
6428+ [%| ["branch pattern is not supported by partial inference" ~]]
8287− ?: &(?=(^ known) ?=(%& -.u.known)) (infer-known-union-branch-subject e env u.known)
8288 ?: =(val.lit.pat.x val.lit.pat.y)
6429 ?: =(val.lit.pat.x val.lit.pat.y)
8289 [%| ["branch does not cover both loobeans" ~]]
6430 [%| ["branch does not cover both loobeans" ~]]
8290 =/ subject=iresult $(e subject.e)
6431 =/ subject=iresult $(e subject.e)
8291 ?: ?=(%| -.subject) subject
6432 ?: ?=(%| -.subject) subject
8292− =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
8293− ?: ?=(%union -.subject-type)
8294− [%| ["union-pattern branch subject is not supported by partial inference" ~]]
8295 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
6433 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
8296 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
6434 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
8297 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
6435 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -8318,776 +6456,64 @@
8318 [%& typ.p.left state.p.right(sub u.joined)]
6456 [%& typ.p.left state.p.right(sub u.joined)]
8319 %cast
6457 %cast
8320 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
6458 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
8321− ?~ target
8322− =/ diag=(unit idiag) (nested-import-invalid shape.e state)
8323− ?^ diag [%| u.diag]
8324− [%| ["cast mold is not supported by partial inference" ~]]
6459+ ?~ target [%| ["cast mold is not supported by partial inference" ~]]
8325 =/ value=iresult
6460 =/ 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))
8326− (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
6464+ (infer-list-context val.e typ.u.target env state.u.target at.shape.e)
6465+ $(e val.e, state state.u.target)
8327 ?: ?=(%| -.value) value
6466 ?: ?=(%| -.value) value
8328− =/ shape=(unit [source=iwfields target=iwfields])
8329− (width-shape typ.p.value typ.u.target sub.state.p.value)
8330− ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
8331 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
6467 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
8332 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
6468 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
8333 ?: ?=(%bad -.fit)
6469 ?: ?=(%bad -.fit)
8334− =/ missing=(unit idiag) (missing-union-tag val.e typ.u.target sub.state.p.value at.shape.e)
8335− ?^ missing [%| u.missing]
8336− =/ 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)
8337− ?^ nested [%| u.nested]
8338 [%| ["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)]]]]
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)]]]]
8339 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
6471 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
8340 [%& merged state.p.value(sub sub.fit, next next.fit)]
6472 [%& merged state.p.value(sub sub.fit, next next.fit)]
8341 %crash [%& [%var next.state] state(next +(next.state))]
6473 %crash [%& [%var next.state] state(next +(next.state))]
8342 %gate
6474 %gate
8343 =/ sam=isample-result (infer-sample sample.e env state)
6475 =/ sam=isample-result (infer-sample sample.e env state)
8344− ?: ?=(%| -.sam)
8345− =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
8346− ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8347− [%| [p.sam ~]]
6476+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8348 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
6477 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
8349 ?: ?=(%| -.body) body
6478 ?: ?=(%| -.body) body
8350 [%& [%fn typ.p.sam typ.p.body] state.p.body]
6479 [%& [%fn typ.p.sam typ.p.body] state.p.body]
8351 %gate-wide
6480 %gate-wide
8352 =/ sam=isample-result (infer-sample sample.e env state)
6481 =/ sam=isample-result (infer-sample sample.e env state)
8353− ?: ?=(%| -.sam)
8354− =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
8355− ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8356− [%| [p.sam ~]]
6482+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8357 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
6483 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
8358 ?: ?=(%| -.body) body
6484 ?: ?=(%| -.body) body
8359 [%& [%fn typ.p.sam typ.p.body] state.p.body]
6485 [%& [%fn typ.p.sam typ.p.body] state.p.body]
8360 %call
6486 %call
8361 ?~ args.e [%| ["call has no argument" ~]]
6487 ?~ args.e [%| ["call has no argument" ~]]
8362− ?: (explicit-proj-call e env state)
6488+ ?^ t.args.e [%| ["multiple arguments are not supported by partial inference" ~]]
8363− [%| ["proj needs an expected record type" ~]]
6489+ =/ head=iresult $(e head.e)
8364− (infer-call-with-head e env state (infer-fragment head.e env state))
6490+ ?: ?=(%| -.head) head
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)]
8365 * [%| ["expression is not supported by partial inference" ~]]
6514 * [%| ["expression is not supported by partial inference" ~]]
8366 ==
6515 ==
8367::
6516::
8368−:: Locate a definite failing argument after the complete sample fit has
8369−:: failed. If an intermediate fit is uncertain, retain the whole argument
8370−:: span rather than assigning blame to a particular argument.
8371−::
8372−:: Check a call using the head already inferred in this state. Keeping
8373−:: this shared avoids evaluating or instantiating a contextual head twice.
8374−++ width-has-projections
8375− |= ps=(list iwprojection)
8376− ^- ?
8377− ?~ ps |
8378− &
8379−::
8380−+$ iwidth-elaboration [original=expr typ=itype sub=isub projections=(list iwprojection)]
8381−++ infer-width-elaboration
8382− |= [e=expr env=ienv state=istate]
8383− ^- (each iwidth-elaboration idiag)
8384− =/ out=iresult (infer-fragment e env state)
8385− ?: ?=(%| -.out) [%| p.out]
8386− [%& [e typ.p.out sub.state.p.out (flop projections.state.p.out)]]
8387−::
8388−:: Source-bound gate-layout evidence, confined to checked root gate
8389−:: definitions and direct unshadowed prelude calls. The prepared prelude
8390−:: interface and its retained source are trusted as a matching artifact.
8391−:: Layouts identify sample binder faces; they do not change call arity or
8392−:: authorize stripping nested value faces. Unknown origins use ordinary fit.
8393−++ direct-written-gates
8394− |= [ds=(list def) out=ivisited]
8395− ^- ivisited
8396− ?~ ds out
8397− ?: ?=(%mold -.i.ds) $(ds t.ds)
8398− ?. |(?=(%gate -.val.i.ds) ?=(%gate-wide -.val.i.ds)) $(ds t.ds)
8399− $(ds t.ds, out (~(put by out) name.i.ds &))
8400−++ direct-may-use-prelude
8401− |= [ds=(list def) root=ivisited heads=ivisited]
8402− ^- ?
8403− ?~ ds |
8404− ?: ?=(%mold -.i.ds) $(ds t.ds)
8405− =/ refs=(list term) (dependency-expr val.i.ds)
8406− =/ has-root=? (lien refs |=(n=term ?=(^ (~(get by root) n))))
8407− =/ has-head=? (lien refs |=(n=term ?=(^ (~(get by heads) n))))
8408− ?: &(has-root has-head) &
8409− $(ds t.ds)
8410−++ direct-unique-names
8411− |= [names=(list term) seen=ivisited]
8412− ^- ?
8413− ?~ names &
8414− ?: ?=(^ (~(get by seen) i.names)) |
8415− $(names t.names, seen (~(put by seen) i.names &))
8416−++ direct-prelude-evidence
8417− |= [ds=(list def) prelude=(unit ifile)]
8418− ^- (unit igate-prelude-evidence)
8419− ?~ prelude ~
8420− ?~ source.u.prelude ~
8421− =/ root=ivisited (direct-written-gates ds ~)
8422− =/ names=(list term) (turn values.u.prelude |=(e=[name=term scheme=ischeme] name.e))
8423− =/ heads=ivisited (graph-nameset names ~)
8424− ?. (direct-may-use-prelude ds root heads) ~
8425− =/ parsed (parse at.u.prelude u.source.u.prelude)
8426− ?: ?=(%| -.parsed) ~
8427− ?^ (duplicate-defs defs.p.parsed) ~
8428− ?. (direct-unique-names (global-value-names defs.p.parsed) ~) ~
8429− =/ gates=(map term def) (direct-checked-gates defs.p.parsed values.u.prelude)
8430− `[u.prelude gates]
8431−++ direct-checked-gates
8432− |= [ds=(list def) env=ienv]
8433− ^- (map term def)
8434− =/ names=(list term) (turn env |=(e=[name=term scheme=ischeme] name.e))
8435− =/ known=ivisited (graph-nameset names ~)
8436− =/ out=(map term def) ~
8437− |-
8438− ?~ ds out
8439− =/ d=def i.ds
8440− ?: ?=(%mold -.d) $(ds t.ds)
8441− ?. ?=(^ (~(get by known) name.d)) $(ds t.ds)
8442− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) $(ds t.ds)
8443− $(ds t.ds, out (~(put by out) name.d d))
8444−++ direct-find-gate
8445− |= [n=term ds=(list def)]
8446− ^- (unit def)
8447− ?~ ds ~
8448− ?: &(?=(%value -.i.ds) =(n name.i.ds)) `i.ds
8449− $(ds t.ds)
8450−++ direct-gate-sample
8451− |= d=def
8452− ^- (unit sample)
8453− ?. ?=(%value -.d) ~
8454− ?- -.val.d
8455− %gate `sample.val.d
8456− %gate-wide `sample.val.d
8457− * ~
8458− ==
8459−++ direct-sample-name
8460− |= sam=sample
8461− ^- (unit term)
8462− ?- -.sam
8463− %bind `name.sam
8464− %face `name.sam
8465− %pun `name.sam
8466− * ~
8467− ==
8468−++ direct-field-name
8469− |= f=field
8470− ^- (unit term)
8471− ?- -.f
8472− %face `name.f
8473− %pun `name.f
8474− * ~
8475− ==
8476−++ direct-slot-body
8477− |= [typ=itype name=(unit term)]
8478− ^- (unit itype)
8479− ?~ name `typ
8480− ?. ?=(%face -.typ) ~
8481− ?. =(name.typ u.name) ~
8482− `body.typ
8483−++ direct-invariant
8484− |= [a=itype b=itype sub=isub next=@ud]
8485− ^- ifit
8486− ?: (itype-face-asym a b sub) [%unknown ~]
8487− =/ forward=ifit (itype-fit a b sub next)
8488− ?. ?=(%ok -.forward) [%unknown ~]
8489− ?: (itype-face-asym a b sub.forward) [%unknown ~]
8490− =/ reverse=ifit (itype-fit b a sub.forward next.forward)
8491− ?. ?=(%ok -.reverse) [%unknown ~]
8492− reverse
8493−++ direct-function-fit
8494− |= [a=itype b=itype sam=sample sh=shape sub=isub next=@ud]
8495− ^- ifit
8496− ?. &(?=(%fn -.a) ?=(%fn -.b) ?=(%cell -.sam) ?=(%fn -.sh)) [%unknown ~]
8497− ?. ?=(%cell -.sample.sh) [%unknown ~]
8498− =/ as=(list sample) items.sam
8499− =/ bs=(list field) fields.sample.sh
8500− ?~ as [%unknown ~]
8501− ?~ t.as [%unknown ~]
8502− ?^ t.t.as [%unknown ~]
8503− ?~ bs [%unknown ~]
8504− ?~ t.bs [%unknown ~]
8505− ?^ t.t.bs [%unknown ~]
8506− ?. &(?=(%cell -.sample.a) ?=(%cell -.sample.b)) [%unknown ~]
8507− =/ an=(unit term) (direct-sample-name i.as)
8508− =/ bn=(unit term) (direct-field-name i.bs)
8509− ?: &(?=(^ an) ?=(^ bn) !=(u.an u.bn)) [%unknown ~]
8510− =/ x=(unit itype) (direct-slot-body hed.sample.a an)
8511− =/ y=(unit itype) (direct-slot-body hed.sample.b bn)
8512− ?~ x [%unknown ~]
8513− ?~ y [%unknown ~]
8514− =/ first=ifit (direct-invariant u.x u.y sub next)
8515− ?. ?=(%ok -.first) [%unknown ~]
8516− =. an (direct-sample-name i.t.as)
8517− =. bn (direct-field-name i.t.bs)
8518− ?: &(?=(^ an) ?=(^ bn) !=(u.an u.bn)) [%unknown ~]
8519− =/ x2=(unit itype) (direct-slot-body tal.sample.a an)
8520− =/ y2=(unit itype) (direct-slot-body tal.sample.b bn)
8521− ?~ x2 [%unknown ~]
8522− ?~ y2 [%unknown ~]
8523− =/ second=ifit (direct-invariant u.x2 u.y2 sub.first next.first)
8524− ?. ?=(%ok -.second) [%unknown ~]
8525− (direct-invariant product.a product.b sub.second next.second)
8526−:: This is a tentative proof: its caller must require closed call samples
8527−:: and repeat every positional check under the stable final substitution.
8528−++ direct-positional-fit
8529− |= [args=(list expr) slots=(list sample) actual=itype expected=itype env=ienv state=istate sub=isub next=@ud]
8530− ^- ifit
8531− ?~ args [%unknown ~]
8532− ?~ slots [%unknown ~]
8533− =/ last=? ?=(~ t.args)
8534− ?: !=(last ?=(~ t.slots)) [%unknown ~]
8535− =/ split=(unit [left=itype right=itype])
8536− ?: last `[actual expected]
8537− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8538− `[hed.actual hed.expected]
8539− ?~ split [%unknown ~]
8540− =/ x=itype left.u.split
8541− =/ y=itype right.u.split
8542− =/ expected-name=(unit term) (direct-sample-name i.slots)
8543− =/ expected-body=(unit itype) (direct-slot-body y expected-name)
8544− ?~ expected-body [%unknown ~]
8545− =. y u.expected-body
8546− =/ fit=ifit (itype-fit x y sub next)
8547− =/ accepted=? &(?=(%ok -.fit) !(itype-positional-slot-face-asym x y sub.fit))
8548− =/ result=(unit ifit)
8549− ?: accepted `fit
8550− ?. &(?=(%face -.i.slots) ?=(%fn -.shape.i.slots)) ~
8551− ?. ?=(%wing -.i.args) ~
8552− ?. ?=([@ ~] names.i.args) ~
8553− ?. (unique-value-name i.names.i.args globals.state) ~
8554− =/ source=(unit def) (~(get by gate-defs.state) i.names.i.args)
8555− ?~ source ~
8556− =/ sample=(unit sample) (direct-gate-sample u.source)
8557− ?~ sample ~
8558− =/ trial=ifit (direct-function-fit x y u.sample shape.i.slots sub next)
8559− ?. ?=(%ok -.trial) ~
8560− `trial
8561− ?~ result [%unknown ~]
8562− =. fit u.result
8563− ?: last fit
8564− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) [%unknown ~]
8565− ?. ?=(%ok -.fit) [%unknown ~]
8566− $(args t.args, slots t.slots, actual tal.actual, expected tal.expected, sub sub.fit, next next.fit)
8567−++ direct-any-gate-arg
8568− |= [args=(list expr) defs=(map term def)]
8569− ^- ?
8570− ?~ args |
8571− =/ found=?
8572− ?. ?=(%wing -.i.args) |
8573− ?. ?=([@ ~] names.i.args) |
8574− ?=(^ (~(get by defs) i.names.i.args))
8575− ?: found &
8576− $(args t.args)
8577−++ direct-gate-call-fit
8578− |= [e=expr actual=itype expected=itype env=ienv state=istate]
8579− ^- (unit ifit)
8580− ?. ?=(%call -.e) ~
8581− ?~ args.e ~
8582− ?~ t.args.e ~
8583− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8584− ?. ?=(%wing -.head.e) ~
8585− ?. ?=([@ ~] names.head.e) ~
8586− ?. ?=(~ (ienv-lookup i.names.head.e env)) ~
8587− ?. (unique-value-name i.names.head.e globals.state) ~
8588− ?. (direct-any-gate-arg args.e gate-defs.state) ~
8589− ?~ prelude.state ~
8590− ?~ source.u.prelude.state ~
8591− ?~ head-evidence.state ~
8592− ?. =(u.prelude.state iface.u.head-evidence.state) ~
8593− ?. ?=(^ (ienv-lookup i.names.head.e values.u.prelude.state)) ~
8594− =/ head=(unit def) (~(get by gates.u.head-evidence.state) i.names.head.e)
8595− ?~ head ~
8596− =/ sam=(unit sample) (direct-gate-sample u.head)
8597− ?~ sam ~
8598− ?. ?=(%cell -.u.sam) ~
8599− =/ fit=ifit (direct-positional-fit args.e items.u.sam actual expected env state sub.state next.state)
8600− ?. ?=(%ok -.fit) ~
8601− :: Enclosing inference may add constraints after this call. Only a
8602− :: closed call-sample proof can remain stable under those later bindings.
8603− =/ actual-final=itype (itype-normalize actual sub.fit)
8604− =/ expected-final=itype (itype-normalize expected sub.fit)
8605− ?^ (itype-vars actual-final) ~
8606− ?^ (itype-vars expected-final) ~
8607− ?: |((itype-has-tag actual-final) (itype-has-tag expected-final)) ~
8608− :: A later argument may resolve a variable used by an earlier slot.
8609− :: Recheck every fit and face against the completed substitution; no
8610− :: additional binding or fresh variable is permitted in the second pass.
8611− =/ verified=ifit (direct-positional-fit args.e items.u.sam actual expected env state sub.fit next.fit)
8612− ?. ?=(%ok -.verified) ~
8613− ?. &(=(sub.fit sub.verified) =(next.fit next.verified)) ~
8614− `fit
8615−::
8616−++ infer-call-with-head
8617− |= [e=expr env=ienv state=istate head=iresult]
8618− ^- iresult
8619− ?> ?=(%call -.e)
8620− ?~ args.e [%| ["call has no argument" ~]]
8621− ?: ?=(%| -.head) head
8622− =/ head-type=itype (itype-walk typ.p.head sub.state.p.head)
8623− =/ arg=iresult
8624− ?^ t.args.e
8625− ?: ?=(%fn -.head-type)
8626− (infer-call-context-args args.e sample.head-type env state.p.head (span-of head.e))
8627− (infer-simple-items (turn args.e |=(a=expr [(span-of a) ~ a])) env state.p.head)
8628− ?: ?=(%fn -.head-type)
8629− (infer-call-context-arg i.args.e sample.head-type env state.p.head (span-of head.e))
8630− (infer-fragment i.args.e env state.p.head)
8631− ?: ?=(%| -.arg) arg
8632− =/ st=istate state.p.arg
8633− =/ ht=itype (itype-walk typ.p.head sub.st)
8634− ?: ?=(%fn -.ht)
8635− =/ shape=(unit [source=iwfields target=iwfields])
8636− ?^ t.args.e ~
8637− (width-shape typ.p.arg sample.ht sub.st)
8638− ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
8639− =/ fit=ifit
8640− ?^ t.args.e (itype-fit-inner typ.p.arg sample.ht sub.st next.st & |)
8641− (itype-fit typ.p.arg sample.ht sub.st next.st)
8642− =/ direct=(unit ifit)
8643− ?: ?=(%ok -.fit) ~
8644− (direct-gate-call-fit e typ.p.arg sample.ht env st)
8645− =. fit ?~(direct fit u.direct)
8646− ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
8647− ?: ?=(%bad -.fit)
8648− ?~ t.args.e
8649− =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
8650− ?^ missing [%| u.missing]
8651− =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
8652− ?^ nested [%| u.nested]
8653− [%| ["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)]]]]
8654− =/ bad=(unit [at=span typ=itype])
8655− (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
8656− =/ whole-args=span
8657− [beg:(span-of i.args.e) end:(span-of (rear args.e))]
8658− =/ arg-at=span ?~(bad whole-args at.u.bad)
8659− =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
8660− [%| ["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)]]]]
8661− =/ face-asym=?
8662− ?^ direct |
8663− ?^ t.args.e (itype-positional-face-asym args.e typ.p.arg sample.ht sub.fit)
8664− (itype-face-asym typ.p.arg sample.ht sub.fit)
8665− ?: &((itype-has-face typ.p.arg sub.fit) face-asym (itype-output-may-be-cell product.ht sub.fit))
8666− [%| ["call result face propagation is not supported by partial inference" ~]]
8667− [%& product.ht st(sub sub.fit, next next.fit)]
8668− =/ result=itype [%var next.st]
8669− =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
8670− ?~ uni
8671− [%| ["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)]]]]
8672− [%& result st(next +(next.st), sub u.uni)]
8673−::
8674−++ call-error-site
8675− |= [args=(list expr) actual=itype expected=itype sub=isub next=@ud]
8676− ^- (unit [at=span typ=itype])
8677− ?~ args ~
8678− =/ original=[left=itype right=itype] [actual expected]
8679− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
8680− =. actual (itype-walk actual sub)
8681− =. expected (itype-walk expected sub)
8682− ?: &(?=(%face -.expected) !?=(%face -.actual))
8683− $(expected body.expected)
8684− ?~ t.args
8685− =/ fit=ifit (itype-fit actual expected sub next)
8686− ?. ?=(%bad -.fit) ~
8687− `[(span-of i.args) (itype-normalize actual sub)]
8688− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8689− =/ first=ifit (itype-fit hed.actual hed.expected sub next)
8690− ?: ?=(%bad -.first) `[(span-of i.args) (itype-normalize hed.actual sub)]
8691− ?: ?=(%unknown -.first) ~
8692− $(args t.args, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8693−::
8694−:: Context can help a call argument or cast value while the final fit
8695−:: checks the complete right-nested type, including any written faces.
8696−::
8697−:: Context can resolve the payload of a canonical prelude unit, but an
8698−:: unrelated union with a similar noun shape is not the same mold.
8699−++ infer-unit-context
8700− |= [e=expr expected=itype env=ienv state=istate context=span]
8701− ^- iresult
8702− ?> ?=(%unit -.e)
8703− ?> ?=(%union -.expected)
8704− ?~ prelude.state (infer-fragment e env state)
8705− =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
8706− ?~ standard (infer-fragment e env state)
8707− ?. (standard-unit-template u.standard at.u.prelude.state) (infer-fragment e env state)
8708− ?. =(origin.expected `[at.u.prelude.state %unit]) (infer-fragment e env state)
8709− ?~ args.expected (infer-fragment e env state)
8710− ?^ t.args.expected (infer-fragment e env state)
8711− =/ payload=itype i.args.expected
8712− =/ canonical=(unit itype) (template-apply u.standard ~[payload])
8713− ?~ canonical (infer-fragment e env state)
8714− ?> ?=(%union -.u.canonical)
8715− ?. =((itype-normalize expected(label ~) sub.state) (itype-normalize u.canonical(label ~) sub.state))
8716− (infer-fragment e env state)
8717− =/ value=iresult (infer-call-context-arg val.e payload env state context)
8718− ?: ?=(%| -.value) value
8719− =/ fit=ifit (itype-fit typ.p.value payload sub.state.p.value next.state.p.value)
8720− ?: ?=(%unknown -.fit) [%| ["unit payload constraint is not supported by partial inference" ~]]
8721− ?: ?=(%bad -.fit)
8722− =/ missing=(unit idiag) (missing-union-tag val.e payload sub.state.p.value context)
8723− ?^ missing [%| u.missing]
8724− =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
8725− ?^ nested [%| u.nested]
8726− [%| ["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)]]]]
8727− [%& expected state.p.value(sub sub.fit, next next.fit)]
8728−::
8729−:: A known gate may receive an enclosing target before its argument is
8730−:: inferred when its result is open or a direct, matching named generic
8731−:: union. Opaque, recursive, tag-constrained and variable-bound union
8732−:: results keep the existing directional path.
8733−++ infer-contextual-call
8734− |= [e=expr expected=itype env=ienv state=istate]
8735− ^- iresult
8736− ?> ?=(%call -.e)
8737− ?~ args.e [%| ["call has no argument" ~]]
8738− =/ head=iresult (infer-fragment head.e env state)
8739− ?: ?=(%| -.head) head
8740− =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
8741− ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
8742− =/ result=itype (itype-walk product.ht sub.state.p.head)
8743− =/ eligible=?
8744− ?: ?=(%var -.result) &
8745− :: A direct known generic union may receive the same nominal result
8746− :: context before its arguments are checked. Variable-bound origins,
8747− :: pending tags, recursive identities and unknown atoms stay open.
8748− ?. &(?=(%union -.product.ht) ?=(%union -.result) ?=(%union -.expected)) |
8749− ?~ origin.result |
8750− ?. =(origin.result origin.expected) |
8751− ?~ args.result |
8752− ?. =((lent args.result) (lent args.expected)) |
8753− ?: |((itype-has-tag (itype-normalize result sub.state.p.head)) (itype-has-tag (itype-normalize expected sub.state.p.head))) |
8754− ?: |((itype-has-recursive (itype-normalize result sub.state.p.head)) (itype-has-recursive (itype-normalize expected sub.state.p.head))) |
8755− ?: |((itype-has-any-atom result sub.state.p.head) (itype-has-any-atom expected sub.state.p.head)) |
8756− &
8757− ?. eligible (infer-call-with-head e env state head)
8758− ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)) (itype-has-tag (itype-normalize expected sub.state.p.head)))
8759− (infer-call-with-head e env state head)
8760− =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
8761− ?~ sub (infer-call-with-head e env state head)
8762− (infer-call-with-head e env state [%& typ.p.head state.p.head(sub u.sub)])
8763−::
8764−:: An eligible fully faced literal receives context by name, in source order.
8765−++ width-literal-fields
8766− |= [items=(list item) axis=@ud fuel=@ud]
8767− ^- (unit iwfields)
8768− =/ order=(list iwfield) ~
8769− =/ index=(map term iwfield) *(map term iwfield)
8770− |-
8771− ?~ items ~
8772− ?: =(0 fuel) ~
8773− ?~ face.i.items ~
8774− =/ at-axis=@ud ?~(t.items axis (mul 2 axis))
8775− =/ entry=iwfield [u.face.i.items at-axis [%noun ~]]
8776− ?: ?=(^ (~(get by index) name.entry)) ~
8777− =. index (~(put by index) name.entry entry)
8778− =. order [entry order]
8779− ?~ t.items `[(flop order) index]
8780− $(items t.items, axis +((mul 2 axis)), fuel (dec fuel))
8781−++ width-infer-items
8782− |= [items=(list item) expected=(map term iwfield) env=ienv state=istate context=span]
8783− ^- iresult
8784− ?~ items [%| ["empty record is not supported" ~]]
8785− ?~ face.i.items [%| ["record face needs unsupported inference" ~]]
8786− =/ field=(unit iwfield) (~(get by expected) u.face.i.items)
8787− =/ head=iresult
8788− ?~ field (infer-fragment val.i.items env state)
8789− (infer-call-context-arg val.i.items typ.u.field env state context)
8790− ?: ?=(%| -.head) head
8791− =/ typ=itype [%face u.face.i.items typ.p.head]
8792− ?~ t.items [%& typ state.p.head]
8793− =/ tail=iresult $(items t.items, state state.p.head)
8794− ?: ?=(%| -.tail) tail
8795− [%& [%cell typ typ.p.tail] state.p.tail]
8796−++ width-infer-literal
8797− |= [e=expr expected=itype env=ienv state=istate context=span]
8798− ^- (unit iresult)
8799− ?. ?=(%tuple -.e) ~
8800− ?. |(?=(%cell -.expected) ?=(%face -.expected)) ~
8801− =/ source=(unit iwfields) (width-literal-fields items.e 1 4.096)
8802− =/ target=(unit iwfields) (width-scan expected sub.state 1 4.096)
8803− ?~ source ~
8804− ?~ target ~
8805− ?: (lth (lent order.u.source) (lent order.u.target)) ~
8806− ?. (width-in-order order.u.source order.u.target)
8807− `(infer-simple-items items.e env state)
8808− `(width-infer-items items.e index.u.target env state context)
8809−::
8810−:: Experimental intrinsic recognition; real bindings retain normal calls.
8811−++ explicit-proj-call
8812− |= [e=expr env=ienv state=istate]
8813− ^- ?
8814− ?. ?=(%call -.e) |
8815− ?. ?=([* ~] args.e) |
8816− ?. ?=(%wing -.head.e) |
8817− ?. =(names.head.e ~[%proj]) |
8818− ?: ?=(^ (ienv-lookup %proj env)) |
8819− ?: (lien globals.state |=(n=term =(n %proj))) |
8820− ?~ prelude.state &
8821− ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
8822−++ infer-proj-source
8823− |= [e=expr expected=itype env=ienv state=istate context=span]
8824− ^- iresult
8825− ?: ?=(%group -.e) $(e inner.e)
8826− =/ literal=(unit iresult) (width-infer-literal e expected env state context)
8827− ?^ literal u.literal
8828− (infer-fragment e env state)
8829−++ infer-proj-context
8830− |= [e=expr expected=itype env=ienv state=istate context=span]
8831− ^- iresult
8832− ?> ?=(%call -.e)
8833− ?~ args.e [%| ["proj needs one record" ~]]
8834− ?. |(?=(%cell -.expected) ?=(%face -.expected)) [%| ["proj needs an expected record type" ~]]
8835− =/ value=iresult (infer-proj-source i.args.e expected env state context)
8836− ?: ?=(%| -.value) value
8837− =/ shape=(unit [source=iwfields target=iwfields])
8838− (width-proj-shape typ.p.value expected sub.state.p.value)
8839− ?~ shape [%| ["proj needs a known record containing its expected fields" ~]]
8840− =/ project=(unit iwidth-result) (width-project u.shape sub.state.p.value next.state.p.value)
8841− ?~ project [%| ["proj constraint needs unsupported inference" ~]]
8842− =/ st=istate state.p.value(sub sub.u.project, next next.u.project)
8843− [%& expected st(projections [[at.e e typ.p.value expected steps.u.project] projections.st])]
8844−::
8845−:: A known literal singleton in a direct union can contextualize a
8846−:: loobean literal of the same noun. Only explicit singleton and cell
8847−:: competitors are considered; opaque or variable cases stay unknown.
8848−++ explicit-singleton-in-union
8849− |= [t=itype noun=@]
8850− ^- ?
8851− ?. ?=(%union -.t) |
8852− =/ cases=(list itype) cases.t
8853− =/ found=? |
8854− |-
8855− ?~ cases found
8856− =/ c=itype i.cases
8857− ?: ?=(%cell -.c) $(cases t.cases)
8858− ?. ?=(%const -.c) |
8859− ?: =(noun val.literal.c)
8860− ?: found |
8861− $(cases t.cases, found &)
8862− $(cases t.cases)
8863−::
8864−:: Select a written literal-headed case only when every competing case is
8865−:: also an explicit singleton-headed cell and exactly one matches. Opaque,
8866−:: variable-bound and differently shaped cases keep inference unchanged.
8867−:: This first slice supplies context to a directly called payload. Plain
8868−:: literal data and other expressions retain their existing inference path.
8869−++ contextual-atomic-arguments
8870− |= args=(list expr)
8871− ^- ?
8872− ?~ args &
8873− ?. ?=(?(%lit %wing %ctor) -.i.args) |
8874− $(args t.args)
8875−++ contextual-direct-payload-call
8876− |= e=expr
8877− ^- ?
8878− ?: ?=(%group -.e) $(e inner.e)
8879− ?. ?=(%call -.e) |
8880− ?. ?=(%wing -.head.e) |
8881− ?~ args.e |
8882− (contextual-atomic-arguments args.e)
8883−::
8884−:: A walked variable may have concealed a union inside a substituted
8885−:: structure before this arm was called. Decline in that case rather than
8886−:: deriving provenance from the already-walked type.
8887−++ contextual-simple-sub
8888− |= sub=isub
8889− ^- ?
8890− ?~ sub &
8891− ?: ?=(?(%cell %face %fn %union %collection) -.val.i.sub) |
8892− $(sub t.sub)
8893−::
8894−:: Check the syntactic root before scanning; scan substitutions once.
8895−++ grec-direct-context
8896− |= [expected=itype sub=isub]
8897− ^- ?
8898− =/ left=@ud 4.096
8899− |-
8900− ?: ?=(%face -.expected)
8901− ?: =(0 left) |
8902− $(expected body.expected, left (dec left))
8903− ?. ?=(%grec -.expected) |
8904− ?~ sub &
8905− ?: =(0 left) |
8906− ?: ?=(?(%cell %face %fn %union %collection %grec) -.val.i.sub) |
8907− $(sub t.sub, left (dec left))
8908−++ contextual-direct-union
8909− |= target=itype
8910− ^- ?
8911− ?: ?=(%face -.target) $(target body.target)
8912− ?=(%union -.target)
8913−++ contextual-tagged-case
8914− |= [target=itype tag=@ sub=isub]
8915− ^- (unit itype)
8916− ?. ?=(%union -.target) ~
8917− =/ remaining=(list itype) cases.target
8918− =/ found=(unit itype) ~
8919− =/ seen=(set @) *(set @)
8920− |-
8921− ?~ remaining found
8922− =/ c=itype i.remaining
8923− ?. ?=(%cell -.c) ~
8924− =/ head=itype hed.c
8925− ?. ?=(%const -.head) ~
8926− ?: (~(has in:..zuse seen) val.literal.head) ~
8927− =. seen (~(put in:..zuse seen) val.literal.head)
8928− ?: =(tag val.literal.head)
8929− $(remaining t.remaining, found `c)
8930− $(remaining t.remaining)
8931−::
8932−++ infer-call-context-arg
8933− |= [e=expr expected=itype env=ienv state=istate context=span]
8934− ^- iresult
8935− ?: ?=(%pair -.e) $(e (pair-as-cell e))
8936− ?: ?=(%group -.e) $(e inner.e)
8937− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8938− ?: ?=(%trace -.e)
8939− =/ traced=iresult (infer-fragment val.e env state)
8940− ?: ?=(%| -.traced) traced
8941− $(e then.e, state state.p.traced)
8942− =/ target=itype (itype-walk expected sub.state)
8943− |-
8944− ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8945− ?: (explicit-proj-call e env state)
8946− (infer-proj-context e expected env state context)
8947− :: Experimental construction only for a source-proven direct target.
8948− :: Decline any walked structural binding to retain raw-variable provenance.
8949− ?: &(?=(%grec -.target) ?=(%tuple -.e) (grec-direct-context expected sub.state))
8950− =/ unfolded=(unit [view=itype left=@ud]) (grec-unfold-view target jrec-fuel.state)
8951− ?~ unfolded [%| ["recursive mold unfolding needs unsupported inference" ~]]
8952− ?~ items.e [%| ["recursive mold constructor needs unsupported inference" ~]]
8953− =/ first=item i.items.e
8954− ?. &(?=(~ face.first) ?=(%lit -.val.first) =(%term form.lit.val.first))
8955− [%| ["recursive mold constructor needs unsupported inference" ~]]
8956− =/ chosen=(unit itype) (contextual-tagged-case view.u.unfolded val.lit.val.first sub.state)
8957− ?~ chosen [%| ["recursive mold constructor has no matching case" ~]]
8958− =/ value=iresult (infer-call-context-items items.e u.chosen env state(jrec-fuel left.u.unfolded) context)
8959− ?: ?=(%| -.value) value
8960− =/ fit=ifit (itype-fit typ.p.value u.chosen sub.state.p.value next.state.p.value)
8961− ?: ?=(%unknown -.fit) [%| ["recursive mold case needs unsupported inference" ~]]
8962− ?: ?=(%bad -.fit) [%| ["recursive mold case does not fit its source shape" ~]]
8963− [%& target state.p.value(sub sub.fit, next next.fit)]
8964− :: Only the source-proven one-layer cell is exposed. Each recursive
8965− :: descent consumes one written tuple; named values use ordinary fit.
8966− ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
8967− ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8968− [%& target state(jrec-fuel (dec jrec-fuel.state))]
8969− ?: &(?=(%jrec -.target) ?=(%tuple -.e))
8970− ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8971− =. state state(jrec-fuel (dec jrec-fuel.state))
8972− =/ shape=itype
8973− [%cell [%face head.target [%atom aura.target]] [%face tail.target target]]
8974− =/ value=iresult (infer-call-context-items items.e shape env state context)
8975− ?: ?=(%| -.value) value
8976− =/ fit=ifit (itype-fit typ.p.value shape sub.state.p.value next.state.p.value)
8977− ?: ?=(%unknown -.fit) [%| ["recursive mold cell constraint needs unsupported inference" ~]]
8978− ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
8979− [%& target state.p.value(sub sub.fit, next next.fit)]
8980− ?: ?=(%call -.e) (infer-contextual-call e target env state)
8981− ?: (single-structured-pattern e)
8982− ?> ?=(%branch -.e)
8983− =/ single=(unit iresult) (grec-single-wing-subject subject.e env state)
8984− ?^ single (infer-known-union-context-subject e target env u.single context)
8985− (infer-single-case-branch e env state `[target context])
8986− ?: (cell-binder-pattern e)
8987− (infer-cell-branch e env state `[target context])
8988− :: In an explicit singleton context retain the written loobean noun;
8989− :: the ordinary singleton fit compares its noun, not its spelling.
8990− =/ singleton=(unit itype)
8991− ?. ?=(%lit -.e) ~
8992− ?. =(%loobean form.lit.e) ~
8993− ?. |(?=(%const -.target) &(?=(%union -.expected) (explicit-singleton-in-union expected val.lit.e))) ~
8994− `[%const lit.e]
8995− ?^ singleton [%& u.singleton state]
8996− =/ known=(unit iresult)
8997− ?: ?=(%branch -.e) (known-union-subject subject.e env state)
8998− ~
8999− ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
9000− ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
9001− (infer-known-union-context-subject e target env u.known context)
9002− ?: &(?=(%union -.target) ?=(%unit -.e))
9003− (infer-unit-context e target env state context)
9004− ?: &(?=(%flag -.target) (context-union-branch e))
9005− (infer-union-context e target env state context)
9006− ?: &(?=(%union -.target) (context-union-branch e))
9007− (infer-union-context e target env state context)
9008− ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch e))
9009− (infer-union-context e target env state context)
9010− ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
9011− (infer-list-context e target env state context)
9012− :: A literal-headed tuple can receive the unique case's payload
9013− :: context. The ordinary final fit still checks the complete union.
9014− =/ selected=(unit itype)
9015− ?. &((contextual-simple-sub sub.state) (contextual-direct-union expected) ?=(%union -.target) ?=(%tuple -.e) ?=(^ items.e)) ~
9016− ?~ t.items.e ~
9017− ?^ t.t.items.e ~
9018− ?. (contextual-direct-payload-call val.i.t.items.e) ~
9019− =/ first=item i.items.e
9020− ?. &(?=(~ face.first) ?=(%lit -.val.first) |(=(%term form.lit.val.first) =(%null form.lit.val.first) =(%loobean form.lit.val.first))) ~
9021− (contextual-tagged-case target val.lit.val.first sub.state)
9022− ?^ selected
9023− ?> ?=(%tuple -.e)
9024− :: On this bounded shallow-call shape, preserve any inference that
9025− :: already fits before trying the new contextual path. Neither pass
9026− :: can recursively select a nested tuple from the atomic arguments.
9027− =/ ordinary=(unit iresult)
9028− =/ initial=iresult (infer-fragment e env state)
9029− ?: ?=(%| -.initial) ~
9030− =/ fit=ifit (itype-fit typ.p.initial target sub.state.p.initial next.state.p.initial)
9031− ?. ?=(%ok -.fit) ~
9032− `initial
9033− ?^ ordinary u.ordinary
9034− =/ value=iresult (infer-call-context-items items.e u.selected env state context)
9035− ?: ?=(%| -.value) value
9036− =/ fit=ifit (itype-fit typ.p.value u.selected sub.state.p.value next.state.p.value)
9037− ?: ?=(%unknown -.fit) [%| ["tagged case needs unsupported inference" ~]]
9038− ?: ?=(%bad -.fit) [%| ["tagged case does not fit its expected type" ~[[context "expected union case"] [(span-of e) "value"]]]]
9039− [%& typ.p.value state.p.value(sub sub.fit, next next.fit)]
9040− ?: &(?=(%cell -.target) ?=(%tuple -.e))
9041− (infer-call-context-items items.e target env state context)
9042− (infer-fragment e env state)
9043−::
9044−:: Preserve each written face; the final complete sample fit checks faces.
9045−:: A tuple or positional field face belongs to the enclosing sample,
9046−:: not to the expression at that position. A second face, if present,
9047−:: is part of the value's own expected type.
9048−++ projection-field-target
9049− |= expected=itype
9050− ^- itype
9051− ?:(?=(%face -.expected) body.expected expected)
9052−::
9053−++ infer-call-context-items
9054− |= [items=(list item) expected=itype env=ienv state=istate context=span]
9055− ^- iresult
9056− ?~ items [%| ["empty cell is not supported by partial inference" ~]]
9057− ?~ t.items
9058− =/ last=iresult (infer-call-context-arg val.i.items (projection-field-target expected) env state context)
9059− ?: ?=(%| -.last) last
9060− =/ typ=itype typ.p.last
9061− =. typ ?~(face.i.items typ [%face u.face.i.items typ])
9062− [%& typ state.p.last]
9063− =/ target=itype (itype-walk expected sub.state)
9064− |-
9065− ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
9066− ?. ?=(%cell -.target) (infer-simple-items items env state)
9067− =/ head=iresult (infer-call-context-arg val.i.items (projection-field-target hed.target) env state context)
9068− ?: ?=(%| -.head) head
9069− =/ typ=itype typ.p.head
9070− =. typ ?~(face.i.items typ [%face u.face.i.items typ])
9071− =/ tail=iresult (infer-call-context-items t.items tal.target env state.p.head context)
9072− ?: ?=(%| -.tail) tail
9073− [%& [%cell typ typ.p.tail] state.p.tail]
9074−::
9075−++ infer-call-context-args
9076− |= [args=(list expr) expected=itype env=ienv state=istate context=span]
9077− ^- iresult
9078− ?~ args [%| ["call has no argument" ~]]
9079− ?~ t.args (infer-call-context-arg i.args (projection-field-target expected) env state context)
9080− =/ target=itype (itype-walk expected sub.state)
9081− |-
9082− ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
9083− ?. ?=(%cell -.target)
9084− (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
9085− =/ head=iresult (infer-call-context-arg i.args (projection-field-target hed.target) env state context)
9086− ?: ?=(%| -.head) head
9087− =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
9088− ?: ?=(%| -.tail) tail
9089− [%& [%cell typ.p.head typ.p.tail] state.p.tail]
9090−::
9091:: Tuple and record expressions preserve their explicitly written faces.
6517:: Tuple and record expressions preserve their explicitly written faces.
9092::
6518::
9093++ infer-simple-items
6519++ infer-simple-items
@@ -9103,55 +6529,11 @@
9103 ?: ?=(%| -.tail) tail
6529 ?: ?=(%| -.tail) tail
9104 [%& [%cell ht typ.p.tail] state.p.tail]
6530 [%& [%cell ht typ.p.tail] state.p.tail]
9105::
6531::
9106−:: A single all-binder cell pattern covers a known cell spine; the final
6532+:: A single two-binder cell pattern covers every value of a cell type.
9107−:: binder captures the remaining noun. Other pattern matrices stay partial.
6533+:: No other pattern matrix is implemented here.
9108−::
9109−:: Validate binders before reading the subject, preserving shadow-error
9110−:: precedence. The last binder receives the entire remaining tail.
9111−++ cell-pattern-names
9112− |= [pats=(list pattern) env=ienv globals=(list term) seen=(list term)]
9113− ^- (each (list term) @t)
9114− ?~ pats [%& ~]
9115− ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
9116− =/ name=term name.i.pats
9117− ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
9118− [%| 'pattern shadows a name']
9119− =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
9120− ?: ?=(%| -.rest) rest
9121− [%& [name p.rest]]
9122−::
9123−++ cell-pattern-types
9124− |= [names=(list term) env=ienv next=@ud]
9125− ^- [typ=itype env=ienv next=@ud]
9126− ?~ names !!
9127− =/ head=itype [%var next]
9128− =/ scope=ienv [[i.names [head ~]] env]
9129− ?~ t.names [head scope +(next)]
9130− =/ tail=[typ=itype env=ienv next=@ud] $(names t.names, env scope, next +(next))
9131− [[%cell head typ.tail] env.tail next.tail]
9132−::
9133−:: At every position that must be a cell, opaque or sum types may still
9134−:: contain cells. Do not report a definite mismatch without unfolding them.
9135−++ cell-pattern-spine-unknown
9136− |= [typ=itype names=(list term) sub=isub]
9137− ^- ?
9138− ?~ names |
9139− ?~ t.names |
9140− =. typ (itype-walk typ sub)
9141− ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
9142− |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%grec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
9143−::
9144−++ cell-binder-pattern
9145− |= e=expr
9146− ^- ?
9147− ?. ?=(%branch -.e) |
9148− ?~ arms.e |
9149− ?^ t.arms.e |
9150− ?. ?=(%cell -.pat.i.arms.e) |
9151− !(single-structured-pattern e)
9152::
6534::
9153++ infer-cell-branch
6535++ infer-cell-branch
9154− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
6536+ |= [e=expr env=ienv state=istate]
9155 ^- iresult
6537 ^- iresult
9156 ?> ?=(%branch -.e)
6538 ?> ?=(%branch -.e)
9157 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
6539 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
@@ -9160,31 +6542,25 @@
9160 =/ pats=(list pattern) items.pat.arm
6542 =/ pats=(list pattern) items.pat.arm
9161 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
6543 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
9162 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
6544 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
9163− =/ names=(each (list term) @t) (cell-pattern-names pats env globals.state ~)
6545+ ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
9164− ?: ?=(%| -.names) [%| [(trip p.names) ~]]
6546+ ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
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" ~]]
9165 =/ subject=iresult (infer-fragment subject.e env state)
6552 =/ subject=iresult (infer-fragment subject.e env state)
9166 ?: ?=(%| -.subject) subject
6553 ?: ?=(%| -.subject) subject
9167 =/ st=istate state.p.subject
6554 =/ st=istate state.p.subject
9168− =/ subject-type=itype (itype-normalize typ.p.subject sub.st)
6555+ ?: (itype-has-recursive (itype-normalize typ.p.subject sub.st))
9169− ?: (itype-has-recursive subject-type)
9170 [%| ["recursive pattern is not supported by partial inference" ~]]
6556 [%| ["recursive pattern is not supported by partial inference" ~]]
9171 ?: (itype-has-face typ.p.subject sub.st)
6557 ?: (itype-has-face typ.p.subject sub.st)
9172 [%| ["record patterns are not supported by partial inference" ~]]
6558 [%| ["record patterns are not supported by partial inference" ~]]
9173− ?: (cell-pattern-spine-unknown subject-type p.names sub.st)
6559+ =/ head=itype [%var next.st]
9174− [%| ["cell pattern subject is not supported by partial inference" ~]]
6560+ =/ tail=itype [%var +(next.st)]
9175− =/ binders=[typ=itype env=ienv next=@ud] (cell-pattern-types p.names env next.st)
9176− =/ sub=(unit isub) (itype-unify typ.p.subject typ.binders sub.st)
6561+ =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
9177 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
6562 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
9178− =. st st(next next.binders, sub u.sub)
6563+ (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
9179− ?~ expected (infer-fragment val.arm env.binders st)
9180− =/ body=iresult (infer-call-context-arg val.arm typ.u.expected env.binders st context.u.expected)
9181− ?: ?=(%| -.body) body
9182− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
9183− ?: ?=(%unknown -.fit) [%| ["cell branch result constraint is not supported by partial inference" ~]]
9184− ?: ?=(%bad -.fit) [%| ["cell branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.arm) "branch arm"]]]]
9185− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
9186− [%| ["cell branch result needs context in partial inference" ~]]
9187− [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
9188::
6564::
9189++ show-itype
6565++ show-itype
9190 |= [t=itype sub=isub]
6566 |= [t=itype sub=isub]
@@ -9197,19 +6573,12 @@
9197 %avar
6573 %avar
9198 ?: (lth id.t 26) [(add 65 id.t) ~]
6574 ?: (lth id.t 26) [(add 65 id.t) ~]
9199 "T{<id.t>}"
6575 "T{<id.t>}"
9200− %rvar
9201− ?: (lth id.t 26) [(add 65 id.t) ~]
9202− "T{<id.t>}"
9203 %nvar
6576 %nvar
9204 ?: (lth id.t 26) [(add 65 id.t) ~]
6577 ?: (lth id.t 26) [(add 65 id.t) ~]
9205 "T{<id.t>}"
6578 "T{<id.t>}"
9206− %rnvar
9207− ?: (lth id.t 26) [(add 65 id.t) ~]
9208− "T{<id.t>}"
9209 %atom "@{(trip aura.t)}"
6579 %atom "@{(trip aura.t)}"
9210 %any-atom "@"
6580 %any-atom "@"
9211 %flag "?"
6581 %flag "?"
9212− %noun "*"
9213 %tag (trip txt.literal.t)
6582 %tag (trip txt.literal.t)
9214 %const (trip txt.literal.t)
6583 %const (trip txt.literal.t)
9215 %union
6584 %union
@@ -9217,8 +6586,6 @@
9217 ?~ args.t (trip u.label.t)
6586 ?~ args.t (trip u.label.t)
9218 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
6587 "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
9219 %recursive ?~(label.t "recursive mold" (trip u.label.t))
6588 %recursive ?~(label.t "recursive mold" (trip u.label.t))
9220− %jrec ?~(label.t "recursive mold" (trip u.label.t))
9221− %grec ?~(label.t "recursive mold" "({(trip u.label.t)} {(show-itype-cases args.t sub)})")
9222 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
6589 %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
9223 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
6590 %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
9224 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
6591 %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
@@ -9254,20 +6621,15 @@
9254 ^- ?
6621 ^- ?
9255 ?- -.typ
6622 ?- -.typ
9256 %nvar &
6623 %nvar &
9257− %rnvar &
9258 %var |
6624 %var |
9259 %avar |
6625 %avar |
9260− %rvar |
9261 %atom |
6626 %atom |
9262 %any-atom |
6627 %any-atom |
9263 %flag |
6628 %flag |
9264− %noun |
9265 %tag |
6629 %tag |
9266 %const |
6630 %const |
9267 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
6631 %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
9268 %recursive |
6632 %recursive |
9269− %jrec |
9270− %grec (lien args.typ |=(c=itype (itype-has-nvar c)))
9271 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
6633 %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
9272 %face $(typ body.typ)
6634 %face $(typ body.typ)
9273 %fn |($(typ sample.typ) $(typ product.typ))
6635 %fn |($(typ sample.typ) $(typ product.typ))
@@ -9278,7 +6640,7 @@
9278 |= [label=tape typ=itype sub=isub]
6640 |= [label=tape typ=itype sub=isub]
9279 ^- tape
6641 ^- tape
9280 =/ normalized=itype (itype-normalize typ sub)
6642 =/ normalized=itype (itype-normalize typ sub)
9281− ?: |(?=(%var -.normalized) ?=(%avar -.normalized) ?=(%rvar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
6643+ ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
9282 ?: (itype-has-hidden-recursive normalized) label
6644 ?: (itype-has-hidden-recursive normalized) label
9283 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
6645 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
9284 ?: (gth (lent vars) 26) label
6646 ?: (gth (lent vars) 26) label
@@ -9288,8 +6650,8 @@
9288:: A capital in a written mold is generalized with its enclosing ++.
6650:: A capital in a written mold is generalized with its enclosing ++.
9289:: Atom constraints may remain generic; until full rigidity checking
6651:: Atom constraints may remain generic; until full rigidity checking
9290:: is implemented, do not report a type if one became more specific.
6652:: is implemented, do not report a type if one became more specific.
9291−:: Distinct written capitals cannot be forced equal; use the same
6653+:: Whether distinct written capitals may become equal is a doc question;
9292−:: capital where a type must be shared (Decisions 2026-10-30).
6654+:: the partial checker leaves such inference unsupported for now.
9293::
6655::
9294++ cap-id-in
6656++ cap-id-in
9295 |= [n=@ud caps=icaps sub=isub]
6657 |= [n=@ud caps=icaps sub=isub]
@@ -9300,43 +6662,11 @@
9300 ?+ -.resolved ~
6662 ?+ -.resolved ~
9301 %var `id.resolved
6663 %var `id.resolved
9302 %avar `id.resolved
6664 %avar `id.resolved
9303− %rvar `id.resolved
9304 ==
6665 ==
9305 ?~ ident $(caps t.caps)
6666 ?~ ident $(caps t.caps)
9306 ?: =(n u.ident) &
6667 ?: =(n u.ident) &
9307 $(caps t.caps)
6668 $(caps t.caps)
9308::
6669::
9309−++ cap-with-id
9310− |= [n=@ud caps=icaps sub=isub]
9311− ^- (unit icap)
9312− ?~ caps ~
9313− =/ resolved=itype (itype-walk [%var id.i.caps] sub)
9314− =/ ident=(unit @ud)
9315− ?+ -.resolved ~
9316− %var `id.resolved
9317− %avar `id.resolved
9318− %rvar `id.resolved
9319− ==
9320− ?~ ident $(caps t.caps)
9321− ?: =(n u.ident) `i.caps
9322− $(caps t.caps)
9323−::
9324−++ merged-capitals
9325− |= [caps=icaps sub=isub]
9326− ^- (unit [first=icap second=icap])
9327− ?~ caps ~
9328− =/ resolved=itype (itype-walk [%var id.i.caps] sub)
9329− =/ ident=(unit @ud)
9330− ?+ -.resolved ~
9331− %var `id.resolved
9332− %avar `id.resolved
9333− %rvar `id.resolved
9334− ==
9335− ?~ ident $(caps t.caps)
9336− =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
9337− ?^ found `[u.found i.caps]
9338− $(caps t.caps)
9339−::
9340++ constrained-capitals
6670++ constrained-capitals
9341 |= [caps=icaps sub=isub]
6671 |= [caps=icaps sub=isub]
9342 ^- ?
6672 ^- ?
@@ -9346,7 +6676,6 @@
9346 ?+ -.resolved ~
6676 ?+ -.resolved ~
9347 %var `id.resolved
6677 %var `id.resolved
9348 %avar `id.resolved
6678 %avar `id.resolved
9349− %rvar `id.resolved
9350 ==
6679 ==
9351 ?~ ident &
6680 ?~ ident &
9352 ?: (cap-id-in u.ident t.caps sub) &
6681 ?: (cap-id-in u.ident t.caps sub) &
@@ -9361,8 +6690,8 @@
9361 ^- ?
6690 ^- ?
9362 ?~ caps |
6691 ?~ caps |
9363 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
6692 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
9364− ?: |(?=(%avar -.resolved) ?=(%rvar -.resolved))
6693+ ?: ?=(%avar -.resolved)
9365− ?: =(n +.resolved) &
6694+ ?: =(n id.resolved) &
9366 $(caps t.caps)
6695 $(caps t.caps)
9367 $(caps t.caps)
6696 $(caps t.caps)
9368::
6697::
@@ -9372,19 +6701,14 @@
9372 ?- -.t
6701 ?- -.t
9373 %var |
6702 %var |
9374 %avar =(n id.t)
6703 %avar =(n id.t)
9375− %rvar =(n id.t)
9376 %nvar |
6704 %nvar |
9377− %rnvar |
9378 %atom |
6705 %atom |
9379 %any-atom |
6706 %any-atom |
9380 %flag |
6707 %flag |
9381− %noun |
9382 %tag |
6708 %tag |
9383 %const |
6709 %const |
9384 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
6710 %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
9385 %recursive |
6711 %recursive |
9386− %jrec |
9387− %grec (lien args.t |=(c=itype (has-atom-var n c)))
9388 %collection (lien args.t |=(c=itype (has-atom-var n c)))
6712 %collection (lien args.t |=(c=itype (has-atom-var n c)))
9389 %face $(t body.t)
6713 %face $(t body.t)
9390 %fn |($(t sample.t) $(t product.t))
6714 %fn |($(t sample.t) $(t product.t))
@@ -9424,10 +6748,6 @@
9424 =/ out=tape ""
6748 =/ out=tape ""
9425 |-
6749 |-
9426 ?~ vars out
6750 ?~ vars out
9427− ?: (itype-var-is-restricted i.vars t)
9428− =/ sep=tape ?:(printed ", " " where ")
9429− =/ clause=tape "{sep}{(show-itype [%rvar i.vars] ~)} is an atom other than ?"
9430− $(vars t.vars, printed &, out (weld out clause))
9431 ?: (itype-var-is-atom i.vars t)
6751 ?: (itype-var-is-atom i.vars t)
9432 =/ sep=tape ?:(printed ", " " where ")
6752 =/ sep=tape ?:(printed ", " " where ")
9433 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
6753 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
@@ -9436,9 +6756,9 @@
9436::
6756::
9437:: Build the supported part of the value environment in dependency order.
6757:: Build the supported part of the value environment in dependency order.
9438:: Each pass adds successful definitions. Forward references become
6758:: Each pass adds successful definitions. Forward references become
9439−:: available on a later pass; unsupported syntax does not enter the
6759+:: available on a later pass; recursive groups and unsupported syntax do
9440−:: environment. Generalized definitions are closed, so a use instantiates
6760+:: not enter the environment. Generalized definitions are closed, so a
9441−:: its variables afresh.
6761+:: use instantiates its variables afresh.
9442::
6762::
9443++ global-value-names
6763++ global-value-names
9444 |= ds=(list def)
6764 |= ds=(list def)
@@ -9456,638 +6776,33 @@
9456 ?~ t.hits &
6776 ?~ t.hits &
9457 |
6777 |
9458::
6778::
9459−:: A top-level gate may refer to itself through one monomorphic placeholder.
9460−:: Its declared sample is inferred first and preserves its field faces.
9461−:: Unify the completed body with that placeholder before generalization;
9462−:: reporting repeats the same check instead of instantiating the gate's
9463−:: generalized interface inside its own body. Mutual groups stay unsupported.
9464−::
9465−++ direct-self-call
9466− |= [e=expr name=term]
9467− ^- ?
9468− ?: ?=(%group -.e) $(e inner.e)
9469− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9470− ?. ?=(%call -.e) |
9471− ?. ?=(%wing -.head.e) |
9472− =(names.head.e ~[name])
9473−::
9474−++ branch-base-arm
9475− |= [e=expr name=term]
9476− ^- (unit expr)
9477− ?: ?=(%group -.e) $(e inner.e)
9478− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9479− ?. ?=(%branch -.e) ~
9480− ?~ arms.e ~
9481− ?~ t.arms.e ~
9482− ?^ t.t.arms.e ~
9483− =/ x=arm i.arms.e
9484− =/ y=arm i.t.arms.e
9485− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) ~
9486− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) ~
9487− ?: =(val.lit.pat.x val.lit.pat.y) ~
9488− =/ first=? (direct-self-call val.x name)
9489− =/ second=? (direct-self-call val.y name)
9490− ?: =(first second) ~
9491− `?:(first val.y val.x)
9492−::
9493−:: Infer the base arm independently, with the self binding removed. Only
9494−:: a closed type whose constraints resolved can seed the recursive result.
9495−:: The regular body inference then checks both arms with shared state.
9496−::
9497−++ recursive-branch-seed
9498− |= [d=def env=ienv state=istate]
9499− ^- (unit itype)
9500− ?. ?=(%value -.d) ~
9501− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) ~
9502− =/ gate=expr val.d
9503− =/ body=expr
9504− ?- -.gate
9505− %gate body.gate
9506− %gate-wide body.gate
9507− * !!
9508− ==
9509− =/ base=(unit expr) (branch-base-arm body name.d)
9510− ?~ base ~
9511− =/ outer=ienv (skim env |=(entry=[name=term scheme=ischeme] !=(name.entry name.d)))
9512− =/ sam=isample-result
9513− ?- -.gate
9514− %gate (infer-sample sample.gate outer state)
9515− %gate-wide (infer-sample sample.gate outer state)
9516− * !!
9517− ==
9518− ?: ?=(%| -.sam) ~
9519− =/ inferred=iresult (infer-fragment u.base env.p.sam state.p.sam)
9520− ?: ?=(%| -.inferred) ~
9521− ?: (pending-tags tags.state.p.inferred sub.state.p.inferred) ~
9522− ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred) ~
9523− =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
9524− ?: ?=(^ (itype-vars typ)) ~
9525− ?: (itype-has-tag typ) ~
9526− `typ
9527−::
9528−++ infer-recursive-gate
9529− |= [d=def env=ienv state=istate]
9530− ^- iresult
9531− =. gate-defs.state ~
9532− ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
9533− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
9534− [%| ["recursive definition is not a gate" ~]]
9535− =/ result=(unit itype) (recursive-branch-seed d env state)
9536− =/ gate=expr val.d
9537− =/ sam=isample-result
9538− ?- -.gate
9539− %gate (infer-sample sample.gate env state)
9540− %gate-wide (infer-sample sample.gate env state)
9541− * !!
9542− ==
9543− ?: ?=(%| -.sam)
9544− =/ diag=(unit idiag)
9545− ?- -.gate
9546− %gate (sample-import-invalid sample.gate env state)
9547− %gate-wide (sample-import-invalid sample.gate env state)
9548− * ~
9549− ==
9550− ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
9551− [%| [p.sam ~]]
9552− =/ id=@ud next.state.p.sam
9553− =/ product=itype ?~(result [%var id] u.result)
9554− =/ st=istate state.p.sam(next +(id))
9555− =/ seed=itype [%fn typ.p.sam product]
9556− =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
9557− =/ body=expr
9558− ?- -.gate
9559− %gate body.gate
9560− %gate-wide body.gate
9561− * !!
9562− ==
9563− =/ out=iresult (infer-fragment body seeded st)
9564− ?: ?=(%| -.out) out
9565− =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
9566− ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
9567− [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
9568−::
9569−++ dependency-root
9570− |= names=(list term)
9571− ^- (list term)
9572− ?~ names ~
9573− ~[(rear names)]
9574−::
9575−++ dependency-exprs
9576− |= xs=(list expr)
9577− ^- (list term)
9578− ?~ xs ~
9579− =/ first=(list term) (dependency-expr i.xs)
9580− (weld first $(xs t.xs))
9581−::
9582−++ dependency-pieces
9583− |= xs=(list piece)
9584− ^- (list term)
9585− ?~ xs ~
9586− =/ first=(list term)
9587− ?- -.i.xs
9588− %expr (dependency-expr p.i.xs)
9589− %text ~
9590− ==
9591− (weld first $(xs t.xs))
9592−::
9593−++ dependency-qsegs
9594− |= xs=(list qseg)
9595− ^- (list term)
9596− ?~ xs ~
9597− =/ first=(list term)
9598− ?- -.i.xs
9599− %expr (dependency-expr p.i.xs)
9600− %knot ~
9601− ==
9602− (weld first $(xs t.xs))
9603−::
9604−++ dependency-items
9605− |= xs=(list item)
9606− ^- (list term)
9607− ?~ xs ~
9608− =/ first=(list term) (dependency-expr val.i.xs)
9609− (weld first $(xs t.xs))
9610−::
9611−++ dependency-edits
9612− |= xs=(list edit)
9613− ^- (list term)
9614− ?~ xs ~
9615− =/ first=(list term) (dependency-expr val.i.xs)
9616− (weld first $(xs t.xs))
9617−::
9618−++ dependency-arms
9619− |= xs=(list arm)
9620− ^- (list term)
9621− ?~ xs ~
9622− =/ first=(list term) (dependency-expr val.i.xs)
9623− (weld first $(xs t.xs))
9624−::
9625−++ dependency-defs
9626− |= xs=(list def)
9627− ^- (list term)
9628− ?~ xs ~
9629− =/ first=(list term)
9630− ?: ?=(%value -.i.xs) (dependency-expr val.i.xs)
9631− ~
9632− (weld first $(xs t.xs))
9633−::
9634−++ dependency-expr
9635− |= e=expr
9636− ^- (list term)
9637− ?- -.e
9638− %str (dependency-pieces pieces.e)
9639− %qath (dependency-qsegs segs.e)
9640− %wing (dependency-root names.e)
9641− %change
9642− =/ first=(list term) (dependency-root target.e)
9643− =/ last=(list term) (dependency-edits edits.e)
9644− (weld first last)
9645− %pair (dependency-expr val.e)
9646− %unit (dependency-expr val.e)
9647− %group (dependency-expr inner.e)
9648− %list (dependency-exprs items.e)
9649− %tuple (dependency-items items.e)
9650− %gate (dependency-expr body.e)
9651− %gate-wide (dependency-expr body.e)
9652− %call
9653− =/ first=(list term) (dependency-expr head.e)
9654− =/ last=(list term) (dependency-exprs args.e)
9655− (weld first last)
9656− %cast (dependency-expr val.e)
9657− %trace
9658− =/ first=(list term) (dependency-expr val.e)
9659− =/ last=(list term) (dependency-expr then.e)
9660− (weld first last)
9661− %branch
9662− =/ first=(list term) (dependency-expr subject.e)
9663− =/ last=(list term) (dependency-arms arms.e)
9664− (weld first last)
9665− %body
9666− =/ first=(list term) (dependency-defs defs.e)
9667− =/ last=(list term) (dependency-expr final.e)
9668− (weld first last)
9669− * ~
9670− ==
9671−::
9672−:: Infer a cyclic component with one monomorphic seed per gate. All members
9673−:: must succeed before any scheme is available; pending constraints and
9674−:: unresolved branch joins remain partial.
9675−+$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
9676−+$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
9677−++ seed-gate-group
9678− |= [ds=(list def) env=ienv state=istate]
9679− ^- igate-seeds
9680− ?~ ds [%& [~ state]]
9681− =/ d=def i.ds
9682− ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
9683− =/ gate=expr val.d
9684− ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
9685− [%| ["recursive group contains a non-gate" ~]]
9686− =/ initial=istate (reserve-def-caps gate state)
9687− =/ sam=isample-result
9688− ?- -.gate
9689− %gate (infer-sample sample.gate env initial)
9690− %gate-wide (infer-sample sample.gate env initial)
9691− * !!
9692− ==
9693− ?: ?=(%| -.sam) [%| [p.sam ~]]
9694− =/ body=expr
9695− ?- -.gate
9696− %gate body.gate
9697− %gate-wide body.gate
9698− * !!
9699− ==
9700− =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
9701− =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
9702− =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
9703− =/ rest=igate-seeds $(ds t.ds, state after)
9704− ?: ?=(%| -.rest) rest
9705− [%& [[entry entries.p.rest] state.p.rest]]
9706−::
9707−++ group-seed-env
9708− |= [entries=(list igate-entry) env=ienv]
9709− ^- ienv
9710− ?~ entries env
9711− [[name.i.entries [typ.i.entries ~]] $(entries t.entries)]
9712−::
9713−++ infer-gate-group-bodies
9714− |= [entries=(list igate-entry) seeds=ienv state=istate]
9715− ^- igate-seeds
9716− ?~ entries [%& [~ state]]
9717− =/ entry=igate-entry i.entries
9718− ?> ?=(%fn -.typ.entry)
9719− =/ scope=ienv (weld seeds env.entry)
9720− =/ out=iresult (infer-fragment body.entry scope state(caps caps.entry))
9721− ?: ?=(%| -.out) out
9722− =/ uni=(unit isub) (itype-unify product.typ.entry typ.p.out sub.state.p.out)
9723− ?~ uni [%| ["recursive group constraint is not supported by partial inference" ~]]
9724− =. caps.entry caps.state.p.out
9725− =/ after=istate state.p.out(sub u.uni, caps caps.state)
9726− =/ rest=igate-seeds $(entries t.entries, state after)
9727− ?: ?=(%| -.rest) rest
9728− [%& [[entry entries.p.rest] state.p.rest]]
9729−::
9730−++ group-schemes
9731− |= [entries=(list igate-entry) env=ienv outer=istate state=istate]
9732− ^- (each ienv idiag)
9733− ?~ entries [%& ~]
9734− =/ entry=igate-entry i.entries
9735− =/ merged=(unit [first=icap second=icap]) (merged-capitals caps.entry sub.state)
9736− ?^ merged
9737− [%| ["distinct type variables must not be forced equal" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
9738− ?: (constrained-capitals caps.entry sub.state)
9739− [%| ["explicit capital constraints are not supported by partial inference" ~]]
9740− =/ typ=itype (itype-normalize typ.entry sub.state)
9741− ?: (itype-has-nvar typ) [%| ["recursive group needs unsupported inference" ~]]
9742− ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
9743− [%| ["recursive group needs unsupported inference" ~]]
9744− =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
9745− =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9746− =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
9747− ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
9748− =/ rest=(each ienv idiag) $(entries t.entries)
9749− ?: ?=(%| -.rest) rest
9750− [%& [[name.entry [typ vars]] p.rest]]
9751−::
9752−++ infer-gate-group
9753− |= [ds=(list def) env=ienv state=istate]
9754− ^- ilocal-result
9755− =/ names=(list term) (global-value-names ds)
9756− ?. (levy names |=(n=term (unique-value-name n names)))
9757− [%| ["recursive group contains duplicate names" ~]]
9758− ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
9759− [%| ["recursive group shadows a name" ~]]
9760− =/ scoped=istate state(globals (weld names globals.state), gate-defs ~)
9761− =/ seeded=igate-seeds (seed-gate-group ds env scoped)
9762− ?: ?=(%| -.seeded) seeded
9763− =/ seeds=ienv (group-seed-env entries.p.seeded ~)
9764− =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
9765− ?: ?=(%| -.body) body
9766− :: Per-member ownership through mutual recursion is not implemented.
9767− ?: !=(projections.state.p.body projections.state)
9768− [%| ["record projection in recursive groups needs unsupported inference" ~]]
9769− ?: !=(holes.state.p.body holes.state)
9770− [%| ["holes in recursive groups need unsupported inference" ~]]
9771− ?: (pending-tags tags.state.p.body sub.state.p.body)
9772− [%| ["recursive group has unresolved literal constraints" ~]]
9773− =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
9774− ?: ?=(%| -.schemes) schemes
9775− [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
9776−::
9777−++ width-finalize
9778− |= [ps=(list iwprojection) sub=isub visible=(list @ud)]
9779− ^- (unit (list iwprojection))
9780− ?~ ps `~
9781− ?: (lien t.ps |=(p=iwprojection =(at.p at.i.ps))) ~
9782− =/ src=itype (default-decimals (itype-normalize source.i.ps sub))
9783− =/ dst=itype (default-decimals (itype-normalize target.i.ps sub))
9784− ?: |((itype-has-nvar src) (itype-has-nvar dst) (itype-has-tag src) (itype-has-tag dst)) ~
9785− =/ vars=(list @ud) (weld (itype-vars src) (itype-vars dst))
9786− ?. (levy vars |=(n=@ud (lien visible |=(v=@ud =(n v))))) ~
9787− =/ rest=(unit (list iwprojection)) $(ps t.ps)
9788− ?~ rest ~
9789− =/ entry=iwprojection i.ps
9790− =. entry entry(source src, target dst)
9791− `[entry u.rest]
9792−::
9793++ add-supported-defs
6779++ add-supported-defs
9794− |= [ds=(list def) all-defs=(list def) checked=(map term def) heads=(unit igate-prelude-evidence) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition)]
9795− ^- [env=ienv artifacts=(list iwidth-definition)]
9796− (add-supported-defs-core ds all-defs checked heads env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts ~)
9797−::
9798−
9799−+$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
9800−+$ iadj (map term (list term))
9801−+$ ivisited (map term ?)
9802−+$ iwork (list [name=term done=?])
9803−+$ iwresult [seen=ivisited order=(list term)]
9804−+$ icresult [seen=ivisited component=(list term)]
9805−+$ icomponents (list (list term))
9806−++ graph-nameset
9807− |= [names=(list term) seen=ivisited]
9808− ^- ivisited
9809− ?~ names seen
9810− $(names t.names, seen (~(put by seen) i.names &))
9811−::
9812−++ graph-edges
9813− |= [name=term graph=iadj]
9814− ^- (list term)
9815− =/ found=(unit (list term)) (~(get by graph) name)
9816− ?~ found ~
9817− u.found
9818−::
9819−++ graph-make-forward
9820− |= [ds=(list def) names=ivisited graph=iadj]
9821− ^- iadj
9822− ?~ ds graph
9823− ?. ?=(%value -.i.ds) $(ds t.ds)
9824− =/ deps=(list term) (dependency-expr val.i.ds)
9825− =. deps (skim deps |=(n=term ?=(^ (~(get by names) n))))
9826− $(ds t.ds, graph (~(put by graph) name.i.ds deps))
9827−::
9828−++ graph-add-reverse
9829− |= [name=term edges=(list term) reverse=iadj]
9830− ^- iadj
9831− ?~ edges reverse
9832− =/ prior=(list term) (graph-edges i.edges reverse)
9833− $(edges t.edges, reverse (~(put by reverse) i.edges [name prior]))
9834−::
9835−++ graph-reverse
9836− |= [names=(list term) graph=iadj reverse=iadj]
9837− ^- iadj
9838− ?~ names reverse
9839− =. reverse (graph-add-reverse i.names (graph-edges i.names graph) reverse)
9840− $(names t.names)
9841−::
9842−++ graph-order
9843− |= [todo=iwork seen=ivisited order=(list term) graph=iadj]
9844− ^- iwresult
9845− ?~ todo [seen order]
9846− =/ event=[name=term done=?] i.todo
9847− ?: done.event $(todo t.todo, order [name.event order])
9848− ?: ?=(^ (~(get by seen) name.event)) $(todo t.todo)
9849− =. seen (~(put by seen) name.event &)
9850− =/ children=iwork (turn (graph-edges name.event graph) |=(n=term [n |]))
9851− $(todo (weld children [[name.event &] t.todo]))
9852−::
9853−++ graph-collect
9854− |= [todo=(list term) seen=ivisited component=(list term) graph=iadj]
9855− ^- icresult
9856− ?~ todo [seen component]
9857− ?: ?=(^ (~(get by seen) i.todo)) $(todo t.todo)
9858− =. seen (~(put by seen) i.todo &)
9859− $(todo (weld (graph-edges i.todo graph) t.todo), component [i.todo component])
9860−::
9861−++ graph-collect-all
9862− |= [order=(list term) seen=ivisited graph=iadj comps=icomponents]
9863− ^- icomponents
9864− ?~ order comps
9865− ?: ?=(^ (~(get by seen) i.order)) $(order t.order)
9866− =/ found=icresult (graph-collect ~[i.order] seen ~ graph)
9867− $(order t.order, seen seen.found, comps [component.found comps])
9868−::
9869−:: Two depth-first passes find components before group inference. Maps
9870−:: preserve the graph identity; duplicate global names fail closed.
9871−++ graph-components
9872− |= [ds=(list def) names=(list term)]
9873− ^- icomponents
9874− =/ nameset=ivisited ~
9875− =/ pending=(list term) names
9876− |-
9877− ?^ pending
9878− ?: ?=(^ (~(get by nameset) i.pending)) ~
9879− $(pending t.pending, nameset (~(put by nameset) i.pending &))
9880− =/ graph=iadj (graph-make-forward ds nameset ~)
9881− =/ reverse=iadj (graph-reverse names graph ~)
9882− =/ order=iwresult (graph-order (turn names |=(n=term [n |])) ~ ~ graph)
9883− (graph-collect-all order.order ~ reverse ~)
9884−::
9885−++ graph-cycle
9886− |= [component=(list term) graph=iadj]
9887− ^- ?
9888− ?~ component |
9889− ?^ t.component &
9890− (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
9891−::
9892−++ add-groups
9893− |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
9894− ^- iresolved
9895− ?~ components [env grouped artifacts]
9896− =/ component=(list term) i.components
9897− ?. (graph-cycle component graph) $(components t.components)
9898− ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
9899− =/ members=(list def)
9900− %+ skim ds
9901− |= d=def
9902− &(?=(%value -.d) (lien component |=(n=term =(n name.d))))
9903− ?. =((lent members) (lent component)) $(components t.components)
9904− ?. (levy component |=(n=term (unique-value-name n globals.state))) $(components t.components)
9905− =/ result=ilocal-result (infer-gate-group members env state)
9906− ?: ?=(%| -.result) $(components t.components)
9907− $(components t.components, env env.p.result, grouped (weld component grouped))
9908−::
9909−++ resolve-groups
9910− |= [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)]
9911− ^- iresolved
9912− (resolve-groups-core ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude ~)
9913−::
9914−
9915−++ add-supported-defs-core
9916− |= [ds=(list def) all-defs=(list def) checked=(map term def) heads=(unit igate-prelude-evidence) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition) index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
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)]
9917− ^- [env=ienv artifacts=(list iwidth-definition)]
6781+ ^- ienv
9918− ?~ ds [env artifacts]
6782+ ?~ ds env
9919 =/ d=def i.ds
6783 =/ d=def i.ds
9920 ?: ?=(%mold -.d) $(ds t.ds)
6784 ?: ?=(%mold -.d) $(ds t.ds)
9921 ?. (unique-value-name name.d globals) $(ds t.ds)
6785 ?. (unique-value-name name.d globals) $(ds t.ds)
9922 ?^ (ienv-lookup name.d env) $(ds t.ds)
6786 ?^ (ienv-lookup name.d env) $(ds t.ds)
9923 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
6787 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9924− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~]
6788+ =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude])
9925− =. grec-index.initial index
9926− =. gate-defs.initial checked
9927− =. head-evidence.initial heads
9928− =. initial (reserve-def-caps val.d initial)
9929− =/ result=iresult (infer-fragment val.d env initial)
9930− =? result ?=(%| -.result) (infer-recursive-gate d env initial)
9931 ?: ?=(%| -.result) $(ds t.ds)
6789 ?: ?=(%| -.result) $(ds t.ds)
9932− =. state.p.result (promote-restricted-numbers state.p.result env)
9933− =. 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)))
9934− ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
9935 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
6790 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
9936 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
6791 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
9937 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
6792 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
9938 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
6793 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
9939 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6794 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9940 ?: (gth (lent vars) 26) $(ds t.ds)
6795 ?: (gth (lent vars) 26) $(ds t.ds)
9941− =/ finalized=(unit (list iwprojection))
9942− (width-finalize projections.state.p.result sub.state.p.result vars)
9943− ?~ finalized $(ds t.ds)
9944− =? artifacts ?=(^ u.finalized)
9945− [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
9946− =? checked |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) (~(put by checked) name.d d)
9947− $(ds t.ds, env [[name.d [typ vars]] env], checked checked)
6796+ $(ds t.ds, env [[name.d [typ vars]] env])
9948−::
9949−++ resolve-groups-core
9950− |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])]
9951− ^- iresolved
9952− =/ env=ienv ~
9953− =/ grouped=(list term) ~
9954− =/ artifacts=(list iwidth-definition) ~
9955− =/ names=(list term) (global-value-names ds)
9956− =/ nameset=ivisited (graph-nameset names ~)
9957− =/ graph=iadj (graph-make-forward ds nameset ~)
9958− =/ components=icomponents (graph-components ds names)
9959− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9960− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
9961− |-
9962− =/ next=[env=ienv artifacts=(list iwidth-definition)]
9963− (add-supported-defs-core ds ds (direct-checked-gates ds env) heads env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts index)
9964− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~]
9965− =. grec-index.initial index
9966− =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
9967− ?: =(env env.out) out
9968− $(env env.out, grouped grouped.out, artifacts artifacts.out)
9969::
6797::
9970++ resolve-supported-defs
6798++ resolve-supported-defs
9971 |= [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)]
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)]
9972 ^- ienv
6800 ^- ienv
9973− env:(resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
6801+ =/ env=ienv ~
9974−::
9975−:: A diagnostic-only proof for a narrow syntactic value cycle. Every
9976−:: edge is an unqualified wing in a supported expression, and samples
9977−:: may not shadow global bindings. Unknown forms yield no conclusion.
9978−+$ icyclesite [name=term at=span]
9979−+$ icycle [name=term first=span next=span]
9980−++ cycle-sites-list
9981− |= [xs=(list expr) globals=(list term) locals=(list term)]
9982− ^- (unit (list icyclesite))
9983− ?~ xs `~
9984− =/ first=(unit (list icyclesite)) (cycle-sites i.xs globals locals)
9985− ?~ first ~
9986− =/ tail=(unit (list icyclesite)) $(xs t.xs)
9987− ?~ tail ~
9988− `(weld u.first u.tail)
9989−::
9990−++ cycle-sample-name
9991− |= [sam=sample globals=(list term) locals=(list term)]
9992− ^- (unit (unit term))
9993− ?- -.sam
9994− %bind
9995− ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9996− ``name.sam
9997− %face
9998− ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9999− ``name.sam
10000− %bare `~
10001− * ~
10002− ==
10003−::
10004−++ cycle-sites
10005− |= [e=expr globals=(list term) locals=(list term)]
10006− ^- (unit (list icyclesite))
10007− ?- -.e
10008− %wing
10009− ?. ?=([@ ~] names.e) ~
10010− `~[[i.names.e at.e]]
10011− %lit `~
10012− %str
10013− ?: (lien pieces.e |=(p=piece ?=(%expr -.p))) ~
10014− `~
10015− %group $(e inner.e)
10016− %body ?~(defs.e $(e final.e) ~)
10017− %cast $(e val.e)
10018− %gate
10019− =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
10020− ?~ binder ~
10021− =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
10022− $(e body.e, locals nested)
10023− %gate-wide
10024− =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
10025− ?~ binder ~
10026− =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
10027− $(e body.e, locals nested)
10028− %call
10029− =/ first=(unit (list icyclesite)) $(e head.e)
10030− ?~ first ~
10031− =/ tail=(unit (list icyclesite)) (cycle-sites-list args.e globals locals)
10032− ?~ tail ~
10033− `(weld u.first u.tail)
10034− * ~
10035− ==
10036−::
10037−++ cycle-definitely-atom
10038− |= e=expr
10039− ^- ?
10040− ?: ?=(%group -.e) $(e inner.e)
10041− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
10042− ?. ?=(%cast -.e) |
10043− |(?=(%aura -.shape.e) ?=(%flag -.shape.e))
10044−::
10045−++ cycle-proof-group
10046− |= [members=(list def) globals=(list term)]
10047− ^- ?
10048− ?~ members &
10049− ?. ?=(%value -.i.members) |
10050− ?. (unique-value-name name.i.members globals) |
10051− ?. ?=(^ (cycle-sites val.i.members globals ~)) |
10052− $(members t.members)
10053−::
10054−++ cycle-find-site
10055− |= [sites=(list icyclesite) component=(list term)]
10056− ^- (unit span)
10057− ?~ sites ~
10058− ?: (lien component |=(n=term =(n name.i.sites))) `at.i.sites
10059− $(sites t.sites)
10060−::
10061−++ cycle-group-errors
10062− |= [members=(list def) component=(list term) globals=(list term)]
10063− ^- (list icycle)
10064− ?~ members ~
10065− =/ d=def i.members
10066− ?> ?=(%value -.d)
10067− =/ tail=(list icycle) $(members t.members)
10068− ?. (cycle-definitely-atom val.d) tail
10069− =/ sites=(unit (list icyclesite)) (cycle-sites val.d globals ~)
10070− ?~ sites tail
10071− =/ found=(unit span) (cycle-find-site u.sites component)
10072− ?~ found tail
10073− [[name.d at.d u.found] tail]
10074−::
10075−++ definite-value-cycles
10076− |= [ds=(list def) globals=(list term)]
10077− ^- (list icycle)
10078− =/ names=(list term) (global-value-names ds)
10079− =/ graph=iadj (graph-make-forward ds (graph-nameset names ~) ~)
10080− =/ components=icomponents (graph-components ds names)
10081− =/ out=(list icycle) ~
10082 |-
6802 |-
10083− ?~ components out
6803+ =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
10084− =/ component=(list term) i.components
6804+ ?: =(next env) env
10085− ?. (graph-cycle component graph) $(components t.components)
6805+ $(env next)
10086− =/ members=(list def)
10087− (skim ds |=(d=def &(?=(%value -.d) (lien component |=(n=term =(n name.d))))))
10088− ?. =((lent members) (lent component)) $(components t.components)
10089− ?. (cycle-proof-group members globals) $(components t.components)
10090− $(components t.components, out (weld (cycle-group-errors members component globals) out))
10091::
6806::
10092+| %union-analysis
6807+| %union-analysis
10093::
6808::
@@ -10224,142 +6939,11 @@
10224 [at.first at.second (union-relate a (project-union-mold second molds ~))]
6939 [at.first at.second (union-relate a (project-union-mold second molds ~))]
10225 (weld pairs $(cases t.cases))
6940 (weld pairs $(cases t.cases))
10226::
6941::
10227−:: A closed structural mold supplies no equation to determine a hole.
10228−:: Applications, references, unbound capitals and unions are unproved.
10229−++ simple-mold-hole
10230− |= sh=shape
10231− ^- (unit (unit span))
10232− ?: ?=(%generic -.sh)
10233− ?~ vars.sh ~
10234− ?. (distinct-params vars.sh) ~
10235− (simple-mold-hole-in body.sh vars.sh)
10236− (simple-mold-hole-in sh ~)
10237−++ simple-mold-hole-in
10238− |= [sh=shape vars=(list @t)]
10239− ^- (unit (unit span))
10240− ?- -.sh
10241− %hole ``at.sh
10242− ?(%aura %noun %void %flag %const) `~
10243− %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
10244− %cell (simple-mold-field-holes fields.sh vars)
10245− %fn
10246− =/ a=(unit (unit span)) $(sh sample.sh)
10247− ?~ a ~
10248− =/ b=(unit (unit span)) $(sh product.sh)
10249− ?~ b ~
10250− `?~(u.a u.b u.a)
10251− %generic ~
10252− * ~
10253− ==
10254−++ simple-mold-field-holes
10255− |= [fields=(list field) vars=(list @t)]
10256− ^- (unit (unit span))
10257− ?~ fields `~
10258− =/ f=field i.fields
10259− =/ first=(unit (unit span))
10260− ?- -.f
10261− %face (simple-mold-hole-in shape.f vars)
10262− %bare (simple-mold-hole-in shape.f vars)
10263− %pun ~
10264− ==
10265− ?~ first ~
10266− =/ rest=(unit (unit span)) $(fields t.fields)
10267− ?~ rest ~
10268− `?~(u.first u.rest u.first)
10269−++ simple-local-mold-hole
10270− |= defs=(list def)
10271− ^- (unit span)
10272− ?~ defs ~
10273− ?. ?=(%mold -.i.defs) $(defs t.defs)
10274− =/ found=(unit (unit span)) (simple-mold-hole shape.i.defs)
10275− ?~ found $(defs t.defs)
10276− ?^ u.found u.found
10277− $(defs t.defs)
10278−::
10279−:: A partial prelude may omit unsupported declarations, but may not
10280−:: publish an interface while a named mold's hole remains unchecked.
10281−++ shape-has-hole
10282− |= sh=shape
10283− ^- ?
10284− ?- -.sh
10285− %hole &
10286− %path (lien segs.sh |=(s=pseg ?=(%inferred -.s)))
10287− %apply (lien args.sh shape-has-hole)
10288− %union (lien cases.sh shape-has-hole)
10289− %cell (lien fields.sh field-has-hole)
10290− %fn |($(sh sample.sh) $(sh product.sh))
10291− %generic $(sh body.sh)
10292− * |
10293− ==
10294−++ field-has-hole
10295− |= f=field
10296− ^- ?
10297− ?- -.f
10298− %face (shape-has-hole shape.f)
10299− %bare (shape-has-hole shape.f)
10300− %pun |
10301− ==
10302−++ named-mold-has-hole
10303− |= ds=(list def)
10304− ^- ?
10305− ?~ ds |
10306− ?: &(?=(%mold -.i.ds) (shape-has-hole shape.i.ds)) &
10307− $(ds t.ds)
10308−::
10309−++ sample-has-hole
10310− |= sam=sample
10311− ^- ?
10312− ?- -.sam
10313− %face (shape-has-hole shape.sam)
10314− %bare (shape-has-hole shape.sam)
10315− %cell (lien items.sam sample-has-hole)
10316− * |
10317− ==
10318−++ def-has-hole
10319− |= d=def
10320− ^- ?
10321− ?- -.d
10322− %mold (shape-has-hole shape.d)
10323− %value (expr-has-hole val.d)
10324− ==
10325−++ expr-has-hole
10326− |= e=expr
10327− ^- ?
10328− ?- -.e
10329− %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
10330− %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
10331− %change (lien edits.e |=(p=edit (expr-has-hole val.p)))
10332− %pair $(e val.e)
10333− %unit $(e val.e)
10334− %group $(e inner.e)
10335− %list (lien items.e expr-has-hole)
10336− %tuple (lien items.e |=(i=item (expr-has-hole val.i)))
10337− ?(%gate %gate-wide) |((sample-has-hole sample.e) $(e body.e))
10338− %cast |((shape-has-hole shape.e) $(e val.e))
10339− %call |($(e head.e) (lien args.e expr-has-hole))
10340− %trace |($(e val.e) $(e then.e))
10341− %branch |($(e subject.e) (lien arms.e |=(a=arm (expr-has-hole val.a))))
10342− %body |((lien defs.e def-has-hole) $(e final.e))
10343− * |
10344− ==
10345−++ hole-values-present
10346− |= [ds=(list def) env=ienv]
10347− ^- ?
10348− ?~ ds &
10349− ?. ?=(%value -.i.ds) $(ds t.ds)
10350− ?: (expr-has-hole val.i.ds)
10351− ?. ?=(^ (ienv-lookup name.i.ds env)) |
10352− $(ds t.ds)
10353− $(ds t.ds)
10354++ show-partial-mold
6942++ show-partial-mold
10355 |= [file=path src=@t d=def molds=imolds]
6943 |= [file=path src=@t d=def molds=imolds]
10356 ^- @t
6944 ^- @t
10357 ?> ?=(%mold -.d)
6945 ?> ?=(%mold -.d)
10358 =/ sh=shape shape.d
6946 =/ sh=shape shape.d
10359− =/ hole=(unit (unit span)) (simple-mold-hole sh)
10360− ?: &(?=(^ hole) ?=(^ u.hole))
10361− =/ text=@t (show-error src [file line.beg.u.u.hole col.beg.u.u.hole "unresolved type hole"])
10362− (of-wain:format ~[(crip "+$ {(trip name.d)}: type hole needs a determined type") text])
10363 =? sh ?=(%generic -.sh) body.sh
6947 =? sh ?=(%generic -.sh) body.sh
10364 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
6948 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
10365 =/ pairs=(list upair) (union-pairs cases.sh molds)
6949 =/ pairs=(list upair) (union-pairs cases.sh molds)
@@ -10386,21 +6970,6 @@
10386 (show-error src [file line.beg.at.site col.beg.at.site note.site])
6970 (show-error src [file line.beg.at.site col.beg.at.site note.site])
10387 (of-wain:format [summary excerpts])
6971 (of-wain:format [summary excerpts])
10388::
6972::
10389−:: Both written field sites are shown in the source that declares them.
10390−++ show-duplicate-fields
10391− |= [file=path src=@t diagnostic=idiag]
10392− ^- @t
10393− =/ excerpts=(list @t)
10394− %+ turn sites.diagnostic
10395− |= site=[at=span note=tape]
10396− (show-error src [file line.beg.at.site col.beg.at.site note.site])
10397− (of-wain:format [(crip msg.diagnostic) excerpts])
10398−::
10399−++ duplicate-fields-report
10400− |= [file=path src=@t diagnostic=idiag]
10401− ^- @t
10402− (of-wain:format ~['partial inference; module not checked' (show-duplicate-fields file src diagnostic)])
10403−::
10404:: +golden-types: a partial report; it does not claim the module checks
6973:: +golden-types: a partial report; it does not claim the module checks
10405::
6974::
10406++ golden-types
6975++ golden-types
@@ -10430,180 +6999,6 @@
10430+$ jfile-result (each [iface=ifile cache=jcache] @t)
6999+$ jfile-result (each [iface=ifile cache=jcache] @t)
10431+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
7000+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
10432::
7001::
10433−:: Written record fields each have their own lexical record scope.
10434−+$ written-fields (map term span)
10435−++ duplicate-written-field
10436− |= [name=term at=span seen=written-fields]
10437− ^- (unit idiag)
10438− =/ prior=(unit span) (~(get by seen) name)
10439− ?~ prior ~
10440− `["record field `{(trip name)}` is repeated" ~[[u.prior "first field"] [at "repeated field"]]]
10441−++ duplicate-shapes
10442− |= xs=(list shape)
10443− ^- (unit idiag)
10444− ?~ xs ~
10445− =/ first (duplicate-shape i.xs)
10446− ?^ first first
10447− $(xs t.xs)
10448−++ duplicate-fields
10449− |= [fields=(list field) seen=written-fields]
10450− ^- (unit idiag)
10451− ?~ fields ~
10452− =/ f=field i.fields
10453− =/ n=(unit term)
10454− ?- -.f
10455− %face `name.f
10456− %pun `name.f
10457− %bare ~
10458− ==
10459− =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.f seen))
10460− ?^ dup dup
10461− =/ inner=(unit idiag)
10462− ?- -.f
10463− %face (duplicate-shape shape.f)
10464− %pun ~
10465− %bare (duplicate-shape shape.f)
10466− ==
10467− ?^ inner inner
10468− $(fields t.fields, seen ?~(n seen (~(put by seen) u.n at.f)))
10469−++ duplicate-shape
10470− |= s=shape
10471− ^- (unit idiag)
10472− ?- -.s
10473− %cell (duplicate-fields fields.s ~)
10474− %apply (duplicate-shapes args.s)
10475− %union (duplicate-shapes cases.s)
10476− %fn
10477− =/ left (duplicate-shape sample.s)
10478− ?^ left left
10479− (duplicate-shape product.s)
10480− %generic (duplicate-shape body.s)
10481− * ~
10482− ==
10483−++ duplicate-samples
10484− |= [items=(list sample) seen=written-fields]
10485− ^- (unit idiag)
10486− ?~ items ~
10487− =/ a=sample i.items
10488− =/ n=(unit term)
10489− ?- -.a
10490− %bind `name.a
10491− %face `name.a
10492− %pun `name.a
10493− * ~
10494− ==
10495− =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.a seen))
10496− ?^ dup dup
10497− =/ inner (duplicate-sample a)
10498− ?^ inner inner
10499− $(items t.items, seen ?~(n seen (~(put by seen) u.n at.a)))
10500−++ duplicate-sample
10501− |= s=sample
10502− ^- (unit idiag)
10503− ?- -.s
10504− %cell (duplicate-samples items.s ~)
10505− %face (duplicate-shape shape.s)
10506− %bare (duplicate-shape shape.s)
10507− * ~
10508− ==
10509−++ duplicate-exprs
10510− |= xs=(list expr)
10511− ^- (unit idiag)
10512− ?~ xs ~
10513− =/ first (duplicate-expr i.xs)
10514− ?^ first first
10515− $(xs t.xs)
10516−++ duplicate-items
10517− |= [items=(list item) seen=written-fields]
10518− ^- (unit idiag)
10519− ?~ items ~
10520− =/ a=item i.items
10521− =/ dup=(unit idiag) ?~(face.a ~ (duplicate-written-field u.face.a at.a seen))
10522− ?^ dup dup
10523− =/ inner (duplicate-expr val.a)
10524− ?^ inner inner
10525− $(items t.items, seen ?~(face.a seen (~(put by seen) u.face.a at.a)))
10526−++ duplicate-pieces
10527− |= pieces=(list piece)
10528− ^- (unit idiag)
10529− ?~ pieces ~
10530− =/ first=(unit idiag) ?:(?=(%expr -.i.pieces) (duplicate-expr p.i.pieces) ~)
10531− ?^ first first
10532− $(pieces t.pieces)
10533−++ duplicate-qsegs
10534− |= segs=(list qseg)
10535− ^- (unit idiag)
10536− ?~ segs ~
10537− =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
10538− ?^ first first
10539− $(segs t.segs)
10540−++ duplicate-edits
10541− |= edits=(list edit)
10542− ^- (unit idiag)
10543− ?~ edits ~
10544− =/ first (duplicate-expr val.i.edits)
10545− ?^ first first
10546− $(edits t.edits)
10547−++ duplicate-arms
10548− |= arms=(list arm)
10549− ^- (unit idiag)
10550− ?~ arms ~
10551− =/ first (duplicate-expr val.i.arms)
10552− ?^ first first
10553− $(arms t.arms)
10554−++ duplicate-defs
10555− |= defs=(list def)
10556− ^- (unit idiag)
10557− ?~ defs ~
10558− =/ first=(unit idiag)
10559− ?- -.i.defs
10560− %mold (duplicate-shape shape.i.defs)
10561− %value (duplicate-expr val.i.defs)
10562− ==
10563− ?^ first first
10564− $(defs t.defs)
10565−++ duplicate-expr
10566− |= e=expr
10567− ^- (unit idiag)
10568− ?- -.e
10569− %str (duplicate-pieces pieces.e)
10570− %qath (duplicate-qsegs segs.e)
10571− %change (duplicate-edits edits.e)
10572− %pair (duplicate-expr val.e)
10573− %unit (duplicate-expr val.e)
10574− %group (duplicate-expr inner.e)
10575− %list (duplicate-exprs items.e)
10576− %tuple (duplicate-items items.e ~)
10577− %gate-wide
10578− =/ first (duplicate-sample sample.e)
10579− ?^ first first
10580− (duplicate-expr body.e)
10581− %gate
10582− =/ first (duplicate-sample sample.e)
10583− ?^ first first
10584− (duplicate-expr body.e)
10585− %cast
10586− =/ first (duplicate-shape shape.e)
10587− ?^ first first
10588− (duplicate-expr val.e)
10589− %call
10590− =/ first (duplicate-expr head.e)
10591− ?^ first first
10592− (duplicate-exprs args.e)
10593− %trace
10594− =/ first (duplicate-expr val.e)
10595− ?^ first first
10596− (duplicate-expr then.e)
10597− %branch
10598− =/ first (duplicate-expr subject.e)
10599− ?^ first first
10600− (duplicate-arms arms.e)
10601− %body
10602− =/ first (duplicate-defs defs.e)
10603− ?^ first first
10604− (duplicate-expr final.e)
10605− * ~
10606− ==
10607++ import-binding-names
7002++ import-binding-names
10608 |= imports=(list import)
7003 |= imports=(list import)
10609 ^- (list term)
7004 ^- (list term)
@@ -10616,60 +7011,6 @@
10616 ==
7011 ==
10617 [n $(imports t.imports)]
7012 [n $(imports t.imports)]
10618::
7013::
10619−++ reserved-proj-sample
10620− |= sam=sample
10621− ^- ?
10622− ?- -.sam
10623− %bind =(name.sam %proj)
10624− %face =(name.sam %proj)
10625− %pun =(name.sam %proj)
10626− %cell (lien items.sam reserved-proj-sample)
10627− * |
10628− ==
10629−++ reserved-proj-pattern
10630− |= p=pattern
10631− ^- ?
10632− ?- -.p
10633− %bind =(name.p %proj)
10634− %cell (lien items.p reserved-proj-pattern)
10635− * |
10636− ==
10637−++ reserved-proj-def
10638− |= d=def
10639− ^- ?
10640− ?: =(name.d %proj) &
10641− ?: ?=(%value -.d) (reserved-proj-expr val.d)
10642− |
10643−++ reserved-proj-expr
10644− |= e=expr
10645− ^- ?
10646− ?- -.e
10647− %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
10648− %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
10649− %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
10650− %pair $(e val.e)
10651− %unit $(e val.e)
10652− %group $(e inner.e)
10653− %list (lien items.e reserved-proj-expr)
10654− %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
10655− ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
10656− %cast $(e val.e)
10657− %call |($(e head.e) (lien args.e reserved-proj-expr))
10658− %trace |($(e val.e) $(e then.e))
10659− %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
10660− %body |((lien defs.e reserved-proj-def) $(e final.e))
10661− * |
10662− ==
10663−::
10664−++ module-has-reserved-proj
10665− |= mod=module
10666− ^- ?
10667− =/ imported=(list term) (import-binding-names imports.mod)
10668− =/ vals=(list term) (global-value-names defs.mod)
10669− =/ molds=imolds (collect-simple-molds defs.mod)
10670− =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10671− |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
10672−::
10673++ module-scope-valid
7014++ module-scope-valid
10674 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
7015 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
10675 ^- ?
7016 ^- ?
@@ -10677,7 +7018,6 @@
10677 =/ vals=(list term) (global-value-names defs.mod)
7018 =/ vals=(list term) (global-value-names defs.mod)
10678 =/ molds=imolds (collect-simple-molds defs.mod)
7019 =/ molds=imolds (collect-simple-molds defs.mod)
10679 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7020 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10680− ?: (module-has-reserved-proj mod) |
10681 ?. %+ levy imported
7021 ?. %+ levy imported
10682 |= n=term
7022 |= n=term
10683 &((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))))
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))))
@@ -10685,22 +7025,6 @@
10685 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
7025 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
10686 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
7026 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
10687::
7027::
10688−:: In an API file or before main's kind is known, a lone `+$ poke`
10689−:: may be a declaration rather than a mold that shadows the prelude. Do not call
10690−:: that one collision definite, and do not hide unrelated scope errors.
10691−++ pending-declared-poke
10692− |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
10693− ^- ?
10694− ?. (lien prelude-molds |=(n=term =(%poke n))) |
10695− ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
10696− =/ pokes=(list def)
10697− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
10698− ?~ pokes |
10699− ?^ t.pokes |
10700− =/ remaining=(list def)
10701− (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
10702− (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
10703−::
10704++ module-mold-types
7028++ module-mold-types
10705 |= [molds=imolds state=istate]
7029 |= [molds=imolds state=istate]
10706 ^- (each imold-types @t)
7030 ^- (each imold-types @t)
@@ -10716,9 +7040,9 @@
10716::
7040::
10717:: Prepare a provisional interface from the trusted vendored source.
7041:: Prepare a provisional interface from the trusted vendored source.
10718:: Every declared name remains reserved, but only molds and values this
7042:: Every declared name remains reserved, but only molds and values this
10719−:: fragment can infer are usable. Unsupported bodies are not validated.
7043+:: fragment can infer are usable. Unsupported bodies are not validated,
10720−:: An optional internal source supplies the prelude's one supported import;
7044+:: and imports into the prelude are not supported yet. The fixed origin
10721−:: clients cannot import that path directly. Named unions retain their origin.
7045+:: gives its named unions the same identity in every importing module.
10722::
7046::
10723:: Recognize only the complete standard prelude list shape. Its recursive
7047:: Recognize only the complete standard prelude list shape. Its recursive
10724:: tail uses the same parameter and the unqualified list name. The reader
7048:: tail uses the same parameter and the unqualified list name. The reader
@@ -10758,20 +7082,6 @@
10758 ?. ?=(%tvar -.i.args.tail) |
7082 ?. ?=(%tvar -.i.args.tail) |
10759 =(var name.i.args.tail)
7083 =(var name.i.args.tail)
10760::
7084::
10761−++ prelude-label
10762− |= [typ=itype name=term vars=(list @ud)]
10763− ^- itype
10764− ?: ?=(%jrec -.typ) typ(label `name)
10765− ?: ?=(%grec -.typ)
10766− ?. (identity-union-parameters vars args.typ) typ(label ~)
10767− typ(label `name)
10768− ?. ?=(%union -.typ) typ
10769− ?. (identity-union-parameters vars args.typ)
10770− ?~ origin.typ typ
10771− ?: =(at.u.origin.typ /lib/jibb/internal/jibb) typ(label ~)
10772− typ
10773− typ(label `name)
10774−::
10775++ partial-prelude-molds
7085++ partial-prelude-molds
10776 |= [molds=imolds state=istate]
7086 |= [molds=imolds state=istate]
10777 ^- imold-types
7087 ^- imold-types
@@ -10784,163 +7094,26 @@
10784 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
7094 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
10785 ?~ out $(molds t.molds)
7095 ?~ out $(molds t.molds)
10786 =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
7096 =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
10787− =. typ.template.u.out (prelude-label typ.template.u.out name.m vars.template.u.out)
10788 [[name.m template.u.out] $(molds t.molds)]
7097 [[name.m template.u.out] $(molds t.molds)]
10789::
7098::
10790−:: A compiler-owned interface available only to the dedicated
7099+++ partial-prelude-interface
10791−:: internal-prelude preparation path, never the ordinary module resolver.
7100+ |= src=@t
10792−++ private-primitive-interface
10793− ^- ifile
10794− =/ a=itype [%avar 0]
10795− =/ pair=itype [%cell a a]
10796− =/ b=itype [%rvar 0]
10797− =/ plus=ischeme [[%fn [%cell b b] b] ~[0]]
10798− =/ minus=ischeme [[%fn b b] ~[0]]
10799− =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
10800− [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~ ~]
10801−::
10802−++ infer-private-internal
10803− |= [src=@t public-source=@t]
10804− ^- (unit ifile)
10805− =/ at=path /lib/jibb/internal/jibb
10806− =/ parsed (parse at src)
10807− ?: ?=(%| -.parsed) ~
10808− =/ mod=module p.parsed
10809− ?^ (duplicate-defs defs.mod) ~
10810− ?~ imports.mod
10811− =/ built=jfile-result (infer-jibb-file at src ~ ~ ~ ~[at] ~ ~ ~ ~)
10812− ?: ?=(%| -.built) ~
10813− `iface.p.built
10814− ?. ?=([[%jibb *] ~] imports.mod) ~
10815− ?. =(path.i.imports.mod /lib/jibb/primitives) ~
10816− ?. (module-scope-valid mod ~ ~) ~
10817− =/ vals=(list term) (global-value-names defs.mod)
10818− ?: (lien vals |=(n=term =(n %main))) ~
10819− =/ molds=imolds (collect-simple-molds defs.mod)
10820− =/ globals=(list term) (weld (import-binding-names imports.mod) vals)
10821− :: The private source can use the public list and unit molds before the
10822− :: prelude is otherwise prepared. Re-read the trusted public source here
10823− :: and admit only its validated canonical templates; do not accept schemes
10824− :: supplied independently by the caller.
10825− =/ public=(each module error) (parse /lib/jibb/prelude/jibb public-source)
10826− ?: ?=(%| -.public) ~
10827− ?^ (duplicate-defs defs.p.public) ~
10828− ?. (module-scope-valid p.public ~ ~) ~
10829− =/ source-molds=imolds (collect-simple-molds defs.p.public)
10830− =/ written-list=(unit shape) (find-simple-mold %list source-molds)
10831− =/ source-list=(unit ischeme)
10832− ?~ written-list ~
10833− ?. (standard-prelude-list u.written-list) ~
10834− `[[%collection %list ~[[%var 0]]] ~[0]]
10835− :: Derive the public unit template from its actual source, then compare
10836− :: the complete nominal template before making it available privately.
10837− =/ unit-decl=(unit shape) (find-simple-mold %unit source-molds)
10838− =/ source-unit=(unit ischeme)
10839− ?~ unit-decl ~
10840− =/ unit-molds=imolds ~[[%unit u.unit-decl]]
10841− =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~ ~ ~ ~]
10842− =/ unit-types=imold-types (partial-prelude-molds unit-molds unit-state)
10843− =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~ ~]
10844− =/ found=(unit ischeme) (find-jibb-mold %unit unit-iface)
10845− ?~ found ~
10846− ?. (standard-unit-template u.found /lib/jibb/prelude/jibb) ~
10847− found
10848− =/ primitive=ifile private-primitive-interface
10849− =? primitive ?=(^ source-list)
10850− primitive(molds [[%list u.source-list] molds.primitive])
10851− =? primitive ?=(^ source-unit)
10852− primitive(molds [[%unit u.source-unit] molds.primitive])
10853− =/ js=ijimports ~[[face.i.imports.mod primitive]]
10854− =/ reserved=(list term) ~[face.i.imports.mod]
10855− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10856− =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~ ~ ~ ~]
10857− =/ mts=(each imold-types @t) (module-mold-types molds state)
10858− =/ usable=(unit imold-types)
10859− ?: ?=(%& -.mts) `p.mts
10860− :: Missing public templates may make an unrelated internal mold
10861− :: unavailable. Validate all molds once with isolated canonical
10862− :: templates before admitting only those inferred using the actual
10863− :: source-backed templates. The proof interface is never exported.
10864− ?. |(?=(~ source-list) ?=(~ source-unit)) ~
10865− =/ nil=itype [%const [%null %n 0 '~']]
10866− =/ canonical-unit=ischeme
10867− [[%union ~[nil [%cell nil [%face %u [%var 0]]]] `[/lib/jibb/prelude/jibb %unit] `%unit ~[[%var 0]]] ~[0]]
10868− =/ canonical-list=ischeme [[%collection %list ~[[%var 0]]] ~[0]]
10869− =/ proof-primitive=ifile private-primitive-interface
10870− =. molds.proof-primitive ~[[%list canonical-list] [%unit canonical-unit]]
10871− =/ proof-imports=ijimports ~[[face.i.imports.mod proof-primitive]]
10872− =/ proof=(each imold-types @t) (module-mold-types molds state(jimports proof-imports))
10873− ?: ?=(%| -.proof) ~
10874− `(partial-prelude-molds molds state)
10875− ?~ usable ~
10876− =/ resolution=iresolved (resolve-groups defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
10877− =/ env=ienv env.resolution
10878− ?. (module-values-complete defs.mod env) ~
10879− `[env u.usable at ~ artifacts.resolution ~ `src ~]
10880−::
10881−++ partial-prelude-interface-with-internal
10882− |= [src=@t internal-source=(unit @t)]
10883 ^- (unit ifile)
7101 ^- (unit ifile)
10884 ?: =(0 src) ~
7102 ?: =(0 src) ~
10885 =/ at=path /lib/jibb/prelude/jibb
7103 =/ at=path /lib/jibb/prelude/jibb
10886 =/ parsed (parse at src)
7104 =/ parsed (parse at src)
10887 ?: ?=(%| -.parsed) ~
7105 ?: ?=(%| -.parsed) ~
10888− ?: (named-mold-has-hole defs.p.parsed) ~
10889− ?^ (duplicate-defs defs.p.parsed) ~
10890− =/ private=(unit ijimports)
10891− ?~ imports.p.parsed `~
10892− ?. ?=([[%jibb *] ~] imports.p.parsed) ~
10893− ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
10894− ?~ internal-source ~
10895− =/ built=(unit ifile) (infer-private-internal u.internal-source src)
10896− ?~ built ~
10897− `~[[face.i.imports.p.parsed u.built]]
7106+ ?^ imports.p.parsed ~
10898− ?~ private ~
10899 ?~ defs.p.parsed ~
7107 ?~ defs.p.parsed ~
10900 ?. (module-scope-valid p.parsed ~ ~) ~
7108 ?. (module-scope-valid p.parsed ~ ~) ~
10901 =/ ds=(list def) defs.p.parsed
7109 =/ ds=(list def) defs.p.parsed
10902 =/ molds=imolds (collect-simple-molds ds)
7110 =/ molds=imolds (collect-simple-molds ds)
10903 =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7111 =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10904− =/ globals=(list term) (weld (import-binding-names imports.p.parsed) (global-value-names ds))
7112+ =/ globals=(list term) (global-value-names ds)
10905− :: Remove raw list before inferring any template, so an altered list
10906− :: cannot leak through an alias. Its name remains reserved either way.
10907− =/ declared=? (lien names |=(name=term =(%list name)))
10908− =/ env-molds=imolds molds
10909− =? env-molds declared
10910− (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
10911− =/ reserved=(list term) ?:(declared ~[%list] ~)
10912− =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~ ~ ~ ~]
7113+ =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ ~ ~ ~ ~ ~ | at names ~]
10913− :: Other prelude molds may use list only after its source has passed
10914− :: the standard-list check. The raw declaration remains removed.
10915− =/ declared-list=(unit shape) (find-simple-mold %list molds)
10916− =/ mold-prelude=(unit ifile)
10917− ?~ declared-list ~
10918− ?. (standard-prelude-list u.declared-list) ~
10919− `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~ ~]
10920− =/ mt=imold-types (partial-prelude-molds molds state(prelude mold-prelude))
7114+ =/ mt=imold-types (partial-prelude-molds molds state)
10921− =/ partial=ifile [~ mt at ~ ~ ~ ~ ~]
7115+ =/ env=ienv (resolve-supported-defs ds molds globals ~ ~ ~ ~ ~ ~ at ~)
10922− :: An explicitly qualified re-export must resolve. Other unsupported
7116+ `[env mt at]
10923− :: prelude declarations remain reserved but absent from the interface.
10924− =/ required=imolds
10925− %+ skim molds
10926− |= m=[name=term body=shape]
10927− =/ sh=shape body.m
10928− ?. ?=(%ref -.sh) |
10929− ?~ names.sh |
10930− ?=(^ t.names.sh)
10931− ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
10932− =/ resolution=iresolved (resolve-groups ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
10933− =/ env=ienv env.resolution
10934− ?. (hole-values-present ds env) ~
10935− =/ deps=(list iwidth-dependency)
10936− ?~ u.private ~
10937− ~[[at.interface.i.u.private source.interface.i.u.private elaborations.interface.i.u.private]]
10938− `[env mt at ~ artifacts.resolution deps `src ~]
10939−::
10940−++ partial-prelude-interface
10941− |= src=@t
10942− ^- (unit ifile)
10943− (partial-prelude-interface-with-internal src ~)
10944::
7117::
10945+$ iprelude [iface=ifile values=(list term) molds=(list term)]
7118+$ iprelude [iface=ifile values=(list term) molds=(list term)]
10946::
7119::
@@ -10955,17 +7128,6 @@
10955 =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
7128 =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10956 `[u.iface vals ms]
7129 `[u.iface vals ms]
10957::
7130::
10958−++ prepare-prelude-with-internal
10959− |= [src=@t internal-source=@t]
10960− ^- (unit iprelude)
10961− =/ iface=(unit ifile) (partial-prelude-interface-with-internal src `internal-source)
10962− ?~ iface ~
10963− =/ parsed (parse /lib/jibb/prelude/jibb src)
10964− ?: ?=(%| -.parsed) ~
10965− =/ vals=(list term) (global-value-names defs.p.parsed)
10966− =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10967− `[u.iface vals ms]
10968−::
10969++ module-values-complete
7131++ module-values-complete
10970 |= [ds=(list def) env=ienv]
7132 |= [ds=(list def) env=ienv]
10971 ^- ?
7133 ^- ?
@@ -10986,76 +7148,12 @@
10986 ?: =(at at.i.cache) `iface.i.cache
7148 ?: =(at at.i.cache) `iface.i.cache
10987 $(cache t.cache)
7149 $(cache t.cache)
10988::
7150::
10989−:: These certificates retain the complete checked source closure. The
10990−:: trusted host must supply the identical prepared prelude and reader nouns.
10991−:: Exact bundle equality binds all source paths and versions; the set
10992−:: retains transitive paths for active-cycle checks. Request-bearing graphs
10993−:: alone have a size limit; incompatible diamond evidence fails closed.
10994−++ request-graph-requests-add
10995− |= [pending=(list irequest-evidence) acc=(list irequest-evidence) fuel=@ud]
10996− ^- (unit (list irequest-evidence))
10997− ?~ pending `acc
10998− ?: =(0 fuel) ~
10999− =/ hit=(list irequest-evidence)
11000− (skim acc |=(x=irequest-evidence &(=(api-at.x api-at.i.pending) =(name.x name.i.pending))))
11001− ?^ hit
11002− ?. ?=([* ~] hit) ~
11003− ?. =(i.hit i.pending) ~
11004− $(pending t.pending, fuel (dec fuel))
11005− $(pending t.pending, acc [i.pending acc], fuel (dec fuel))
11006−++ request-graph-inputs-match
11007− |= [g=irequest-graph externals=iexternals marks=imark-externals modules=jbundle values=(list term) molds=(list term) prelude=(unit ifile)]
11008− ^- ?
11009− ?& =(bundle-input.g modules)
11010− =(prelude-input.g prelude)
11011− =(prelude-values.g values)
11012− =(prelude-molds.g molds)
11013− =(externals.g externals)
11014− =(marks.g marks)
11015− ==
11016−++ request-graph-merge
11017− |= [imports=ijimports g=irequest-graph fuel=@ud]
11018− ^- (unit irequest-graph)
11019− ?~ imports `g
11020− ?: =(0 fuel) ~
11021− =/ child=ifile interface.i.imports
11022− ?~ graph.child ~
11023− =/ cg=irequest-graph u.graph.child
11024− ?. ?& =(bundle-input.g bundle-input.cg)
11025− =(prelude-input.g prelude-input.cg)
11026− =(prelude-values.g prelude-values.cg)
11027− =(prelude-molds.g prelude-molds.cg)
11028− =(externals.g externals.cg)
11029− =(marks.g marks.cg)
11030− ==
11031− ~
11032− =/ merged=(set path) (~(uni in:..zuse paths.g) paths.cg)
11033− =/ rs=(unit (list irequest-evidence))
11034− (request-graph-requests-add requests.cg requests.g (add 1 (lent requests.cg)))
11035− ?~ rs ~
11036− ?: &(?=(^ u.rs) |((gth (lent ~(tap in:..zuse merged)) 256) (gth (lent u.rs) 256))) ~
11037− $(imports t.imports, g g(paths merged, requests u.rs), fuel (dec fuel))
11038−++ request-graph-reusable
11039− |= [f=ifile src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) values=(list term) molds=(list term) prelude=(unit ifile)]
11040− ^- ?
11041− ?~ source.f |
11042− ?. =(u.source.f src) |
11043− ?~ graph.f |
11044− =/ g=irequest-graph u.graph.f
11045− ?. (request-graph-inputs-match g externals marks modules values molds prelude) |
11046− ?. (~(has in:..zuse paths.g) at.f) |
11047− !(lien active |=(p=path (~(has in:..zuse paths.g) p)))
11048−::
11049++ resolve-jibb-imports
7151++ resolve-jibb-imports
11050 |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
7152 |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
11051 ^- jimports-result
7153 ^- jimports-result
11052 ?~ imports [%& [~ cache]]
7154 ?~ imports [%& [~ cache]]
11053 ?. ?=(%jibb -.i.imports) $(imports t.imports)
7155 ?. ?=(%jibb -.i.imports) $(imports t.imports)
11054 =/ at=path (weld path.i.imports `path`~[%jibb])
7156 =/ at=path (weld path.i.imports `path`~[%jibb])
11055− ?: =(at /lib/jibb/internal/jibb)
11056− [%| 'the prelude internal module is private']
11057− ?: =(at /lib/jibb/primitives/jibb)
11058− [%| 'the prelude primitive interface is private']
11059 ?: (lien active |=(p=path =(p at)))
7157 ?: (lien active |=(p=path =(p at)))
11060 [%| (crip "import cycle at {(spud at)}")]
7158 [%| (crip "import cycle at {(spud at)}")]
11061 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
7159 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
@@ -11063,882 +7161,39 @@
11063 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
7161 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
11064 =/ cached=(unit ifile) (find-jibb-cache at cache)
7162 =/ cached=(unit ifile) (find-jibb-cache at cache)
11065 =/ iface=jfile-result
7163 =/ iface=jfile-result
11066− ?^ cached
11067− ?. =(at.u.cached at) [%| 'cached module identity needs unsupported inference']
11068− ?~ graph.u.cached
11069− :: A detached legacy interface has unknown evidence. Rebuild it
11070− :: against the current graph, without retaining any stale entry.
11071− =/ clean=jcache (skim cache |=(x=[at=path iface=ifile] !=(at.x at)))
11072− (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds clean prelude)
11073− ?. (request-graph-reusable u.cached source.i.found externals mark-externals modules active prelude-values prelude-molds prelude)
11074− [%| 'cached module evidence needs unsupported inference']
11075− [%& [u.cached cache]]
7164+ ?^ cached [%& [u.cached cache]]
11076 (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
7165 (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
11077 ?: ?=(%| -.iface) [%| p.iface]
7166 ?: ?=(%| -.iface) [%| p.iface]
11078 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
7167 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
11079 ?: ?=(%| -.rest) rest
7168 ?: ?=(%| -.rest) rest
11080 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
7169 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
11081::
7170::
11082−:: Provisional declaration extraction only; this does not derive asks,
11083−:: validate imported types, or claim that an API module has checked.
11084−+$ iapi-path [at=span name=term segments=(list pseg) full=term diffs=(list term) scry=(unit (list pseg))]
11085−++ api-path-mark
11086− |= [sh=shape marks=(list term)]
11087− ^- (unit term)
11088− ?. ?=(%ref -.sh) ~
11089− ?. ?=([@ ~] names.sh) ~
11090− ?. (unique-value-name i.names.sh marks) ~
11091− `i.names.sh
11092−::
11093−++ api-path-diffs
11094− |= [shapes=(list shape) marks=(list term) used=(list term)]
11095− ^- (unit (list term))
11096− ?~ shapes `~
11097− =/ n=(unit term) (api-path-mark i.shapes marks)
11098− ?~ n ~
11099− ?: (lien used |=(x=term =(x u.n))) ~
11100− =/ rest=(unit (list term)) $(shapes t.shapes, used [u.n used])
11101− ?~ rest ~
11102− `[u.n u.rest]
11103−::
11104−++ api-path-payload
11105− |= [sh=shape marks=(list term)]
11106− ^- (unit [full=term diffs=(list term)])
11107− =/ direct=(unit term) (api-path-mark sh marks)
11108− ?^ direct `[u.direct ~]
11109− ?. ?=(%apply -.sh) ~
11110− ?. =(~[%facts] ref.sh) ~
11111− ?~ args.sh ~
11112− ?~ t.args.sh ~
11113− =/ full=(unit term) (api-path-mark i.args.sh marks)
11114− ?~ full ~
11115− =/ diffs=(unit (list term)) (api-path-diffs t.args.sh marks ~[u.full])
11116− ?~ diffs ~
11117− `[u.full u.diffs]
11118−::
11119−+$ iapi-parameter [name=term aura=@ta at=span]
11120−++ api-path-parameters
11121− |= [segments=(list pseg) seen=(list term)]
11122− ^- (unit (list iapi-parameter))
11123− ?~ segments `~
11124− ?: ?=(%knot -.i.segments) $(segments t.segments)
11125− =/ seg=pseg i.segments
11126− ?. ?=(%typed -.seg) ~
11127− ?: =(0 aura.seg) ~
11128− ?: (lien seen |=(n=term =(n name.seg))) ~
11129− =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
11130− ?~ rest ~
11131− `[[name.seg aura.seg at.seg] u.rest]
11132−::
11133−++ api-scry-parameters-compatible
11134− |= [scry=(list iapi-parameter) watch=(list iapi-parameter)]
11135− ^- ?
11136− ?~ scry &
11137− ?. (lien watch |=(p=iapi-parameter &(=(name.p name.i.scry) =(aura.p aura.i.scry)))) |
11138− $(scry t.scry)
11139−::
11140−++ api-path-one
11141− |= [sh=shape marks=(list term)]
11142− ^- (unit iapi-path)
11143− ?. ?=(%cell -.sh) ~
11144− =/ fs=(list field) fields.sh
11145− ?~ fs ~
11146− ?~ t.fs ~
11147− ?~ t.t.fs ~
11148− ?: (gth (lent fs) 4) ~
11149− ?. ?=(%bare -.i.fs) ~
11150− =/ tag=shape shape.i.fs
11151− ?. ?=(%const -.tag) ~
11152− ?. =(%term form.lit.tag) ~
11153− =/ name=term val.lit.tag
11154− ?. (jibb-face-name name) ~
11155− ?. ?=(%bare -.i.t.fs) ~
11156− =/ path-shape=shape shape.i.t.fs
11157− ?. ?=(%path -.path-shape) ~
11158− ?. ?=(%bare -.i.t.t.fs) ~
11159− =/ payload=(unit [full=term diffs=(list term)]) (api-path-payload shape.i.t.t.fs marks)
11160− ?~ payload ~
11161− =/ scry=(unit (unit (list pseg)))
11162− ?~ t.t.t.fs `~
11163− =/ entry=field i.t.t.t.fs
11164− ?. ?=(%face -.entry) ~
11165− ?. =(%scry name.entry) ~
11166− ?. ?=(%path -.shape.entry) ~
11167− ``segs.shape.entry
11168− ?~ scry ~
11169− =/ params=(unit (list iapi-parameter)) (api-path-parameters segs.path-shape ~)
11170− ?~ params ~
11171− ?^ u.scry
11172− =/ scry-params=(unit (list iapi-parameter)) (api-path-parameters u.u.scry ~)
11173− ?~ scry-params ~
11174− ?. (api-scry-parameters-compatible u.scry-params u.params) ~
11175− `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
11176− `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
11177−::
11178−++ api-path-many
11179− |= [shapes=(list shape) marks=(list term) seen=(list term)]
11180− ^- (unit (list iapi-path))
11181− ?~ shapes `~
11182− =/ one=(unit iapi-path) (api-path-one i.shapes marks)
11183− ?~ one ~
11184− ?: (lien seen |=(n=term =(n name.u.one))) ~
11185− =/ rest=(unit (list iapi-path)) $(shapes t.shapes, seen [name.u.one seen])
11186− ?~ rest ~
11187− `[u.one u.rest]
11188−::
11189−++ api-path-declaration
11190− |= [sh=shape marks=(list term)]
11191− ^- (unit (list iapi-path))
11192− ?: ?=(%union -.sh) (api-path-many cases.sh marks ~)
11193− (api-path-many ~[sh] marks ~)
11194−::
11195−:: Derived gates share the value namespace. /% marks name molds; /- and
11196−:: /= also introduce faces that cannot be shadowed by a derived value.
11197−++ api-import-faces
11198− |= imports=(list import)
11199− ^- (list term)
11200− ?~ imports ~
11201− ?- -.i.imports
11202− %mark $(imports t.imports)
11203− %sur [name.i.imports $(imports t.imports)]
11204− %jibb [face.i.imports $(imports t.imports)]
11205− ==
11206−::
11207−++ api-derived-names-valid
11208− |= [paths=(list iapi-path) poke-names=(list term) mod=module prelude-values=(list term)]
11209− ^- ?
11210− =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
11211− =/ derived=(list term) (weld path-names poke-names)
11212− ?: (lien derived |=(n=term =(n %proj))) |
11213− =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
11214− (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
11215−::
11216−:: Analysis only. Successful external entries must be unchanged results
11217−:: produced for the declared marks; no request interface is produced.
11218−+$ iapi-mark-type [name=term typ=itype]
11219−+$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
11220−++ api-diff-types
11221− |= [names=(list term) externals=imark-externals declared=(list term)]
11222− ^- (unit (list iapi-mark-type))
11223− ?~ names `~
11224− =/ typ=(unit itype) (find-imported-mark i.names externals declared)
11225− ?~ typ ~
11226− =/ tail=(unit (list iapi-mark-type)) $(names t.names)
11227− ?~ tail ~
11228− `[[i.names u.typ] u.tail]
11229−::
11230−++ api-path-types
11231− |= [paths=(list iapi-path) externals=imark-externals declared=(list term)]
11232− ^- (unit (list iapi-path-typed))
11233− ?~ paths `~
11234− =/ full=(unit itype) (find-imported-mark full.i.paths externals declared)
11235− ?~ full ~
11236− =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared)
11237− ?~ diffs ~
11238− =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
11239− ?~ tail ~
11240− `[[i.paths u.full u.diffs] u.tail]
11241−::
11242−++ api-poke-mark-names
11243− |= [pokes=(list def) declared=(list term)]
11244− ^- (unit (list term))
11245− ?~ pokes `~
11246− ?^ t.pokes ~
11247− =/ d=def i.pokes
11248− ?. ?=(%mold -.d) ~
11249− =/ sh=shape shape.d
11250− ?: ?=(%union -.sh) (api-path-diffs cases.sh declared ~)
11251− =/ name=(unit term) (api-path-mark sh declared)
11252− ?~ name ~
11253− `~[u.name]
11254−::
11255−++ api-path-analysis
11256− |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
11257− ^- (unit (list iapi-path-typed))
11258− ?: (lien defs.mod def-has-hole) ~
11259− ?^ (duplicate-defs defs.mod) ~
11260− =/ ds=(list def) defs.mod
11261− =/ declarations=(list def)
11262− (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
11263− ?. ?=([* ~] declarations) ~
11264− =/ pokes=(list def)
11265− (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
11266− ?: (gth (lent pokes) 1) ~
11267− =/ ordinary=(list def)
11268− (skim ds |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11269− ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
11270− =/ declared=(list term) (collect-mark-imports imports.mod)
11271− =/ poke-names=(unit (list term)) (api-poke-mark-names pokes declared)
11272− ?~ poke-names ~
11273− =/ decl=def i.declarations
11274− ?> ?=(%mold -.decl)
11275− =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
11276− ?~ paths ~
11277− ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
11278− (api-path-types u.paths externals declared)
11279−::
11280−:: Source/graph entry for path analysis only. The returned paths retain
11281−:: reader-derived mark types and import resolution has checked reachable
11282−:: Jibb dependencies. This is not an API interface or a module check.
11283−++ api-path-analysis-source
11284− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
11285− ^- (each (list iapi-path-typed) @t)
11286− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
11287− =/ parsed (parse file src)
11288− ?: ?=(%| -.parsed) [%| 'API path source does not parse']
11289− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11290− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11291− ?~ prepared [%| 'API path analysis needs the prepared prelude']
11292− =/ prelude=(unit ifile) `iface.u.prepared
11293− =/ deps=jimports-result
11294− (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
11295− ?: ?=(%| -.deps) [%| p.deps]
11296− =/ paths=(unit (list iapi-path-typed))
11297− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
11298− ?~ paths [%| 'API path declaration needs unsupported analysis']
11299− [%& u.paths]
11300−::
11301−:: Analysis evidence retains the API source, the prepared interface, the
11302−:: caller's reader results and the resolved Jibb dependency cache alongside
11303−:: the typed path declarations. Reader results and prepared interfaces are
11304−:: trusted inputs: this does not verify their underlying Hoon source/version,
11305−:: create requests or check the provenance of arbitrary values.
11306−+$ iapi-path-evidence
11307− [at=path source=@t prepared=iprelude externals=iexternals marks=imark-externals dependencies=jcache paths=(list iapi-path-typed)]
11308−++ api-path-evidence-source
11309− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
11310− ^- (each iapi-path-evidence @t)
11311− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
11312− =/ parsed (parse file src)
11313− ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
11314− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11315− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11316− ?~ prepared [%| 'API path evidence needs the prepared prelude']
11317− =/ public=ifile iface.u.prepared
11318− =/ deps=jimports-result
11319− (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
11320− ?: ?=(%| -.deps) [%| p.deps]
11321− =/ paths=(unit (list iapi-path-typed))
11322− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
11323− ?~ paths [%| 'API path declaration needs unsupported analysis']
11324− [%& [file src u.prepared externals marks cache.p.deps u.paths]]
11325−:: Graph-aware variant preserves the caller active stack and cache.
11326−++ api-path-evidence-graph
11327− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11328− ^- (each iapi-path-evidence @t)
11329− ?~ active [%| 'API analysis needs an active graph']
11330− ?. =(i.active file) [%| 'API analysis active graph does not start at the source']
11331− ?: (lien t.active |=(p=path =(p file))) [%| 'API analysis active graph contains a cycle']
11332− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
11333− =/ parsed (parse file src)
11334− ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
11335− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11336− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11337− ?~ prepared [%| 'API path evidence needs the prepared prelude']
11338− =/ public=ifile iface.u.prepared
11339− =/ deps=jimports-result
11340− (resolve-jibb-imports imports.p.parsed externals marks modules active values.u.prepared molds.u.prepared cache `public)
11341− ?: ?=(%| -.deps) [%| p.deps]
11342− =/ paths=(unit (list iapi-path-typed))
11343− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
11344− ?~ paths [%| 'API path declaration needs unsupported analysis']
11345− [%& [file src u.prepared externals marks cache.p.deps u.paths]]
11346−::
11347−:: This query classifies a unique path declaration only. Missing evidence
11348−:: or a nonunique name is unknown; it proves nothing about an ask value.
11349−:: Like prepared interfaces, the supplied evidence is a trusted host input.
11350−++ api-path-watchability
11351− |= [evidence=(unit iapi-path-evidence) case-name=term]
11352− ^- ?(%watchable %not-watchable %unknown)
11353− ?~ evidence %unknown
11354− =/ found=(list iapi-path-typed)
11355− (skim paths.u.evidence |=(p=iapi-path-typed =(name.path.p case-name)))
11356− ?. ?=([* ~] found) %unknown
11357− ?~ scry.path.i.found %watchable
11358− %not-watchable
11359−::
11360−:: These are declaration-derived request components, not a callable gate,
11361−:: an ask value, or proof of a value's provenance. Keep the exact trusted
11362−:: source/reader evidence until a later checked interface and lowerer can
11363−:: attach it to a generated request. No argument ordering is claimed here.
11364−+$ iapi-request-parameter [name=term typ=itype at=span]
11365−+$ iapi-request-parts
11366− [evidence=iapi-path-evidence path=iapi-path-typed parameters=(list iapi-request-parameter) reply-sample=itype fold=(unit itype) watchability=?(%watchable %not-watchable)]
11367−++ api-request-parameter-types
11368− |= params=(list iapi-parameter)
11369− ^- (unit (list iapi-request-parameter))
11370− ?~ params `~
11371− =/ aura=@ta aura.i.params
11372− ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
11373− =/ rest=(unit (list iapi-request-parameter)) $(params t.params)
11374− ?~ rest ~
11375− `[[name.i.params [%atom aura] at.i.params] u.rest]
11376−::
11377−:: A single diff's fold consumes the tagged diff and the previous full value.
11378−:: Multiple-diff unions need a checked union representation and remain open.
11379−++ api-request-fold-type
11380− |= p=iapi-path-typed
11381− ^- (unit (unit itype))
11382− ?~ diffs.p `~
11383− ?^ t.diffs.p ~
11384− =/ d=iapi-mark-type i.diffs.p
11385− =/ literal=lit [%term %tas name.d (crip ['%' (trip name.d)])]
11386− =/ sample=itype [%cell [%cell [%const literal] typ.d] full.p]
11387− ``[%fn sample full.p]
11388−::
11389−++ api-request-parts
11390− |= [evidence=(unit iapi-path-evidence) case-name=term]
11391− ^- (unit iapi-request-parts)
11392− ?~ evidence ~
11393− =/ found=(list iapi-path-typed)
11394− (skim paths.u.evidence |=(p=iapi-path-typed =(name.path.p case-name)))
11395− ?. ?=([* ~] found) ~
11396− =/ p=iapi-path-typed i.found
11397− =/ raw=(unit (list iapi-parameter)) (api-path-parameters segments.path.p ~)
11398− ?~ raw ~
11399− =/ params=(unit (list iapi-request-parameter)) (api-request-parameter-types u.raw)
11400− ?~ params ~
11401− =/ fold=(unit (unit itype)) (api-request-fold-type p)
11402− ?~ fold ~
11403− =/ watch=?(%watchable %not-watchable) ?~(scry.path.p %watchable %not-watchable)
11404− `[u.evidence p u.params full.p u.fold watch]
11405−::
11406−:: Check ordinary API molds and values plus every declared mark type using
11407−:: the same trusted source, prepared prelude and reader inputs as path
11408−:: evidence. Keep elaborations with those inputs for a later interface.
11409−:: This is partial analysis: an unused /- core is not independently checked,
11410−:: definitions needing derived values remain unsupported, and no complete
11411−:: API, request or constructor is exported or given runtime behavior.
11412−+$ iapi-support-evidence
11413− [paths=iapi-path-evidence values=ienv molds=imold-types marks=(list iapi-mark-type) elaborations=(list iwidth-definition)]
11414−++ api-support-analysis-source
11415− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
11416− ^- (each iapi-support-evidence @t)
11417− =/ path-result (api-path-evidence-source file src externals marks modules prepared)
11418− ?: ?=(%| -.path-result) [%| p.path-result]
11419− =/ evidence=iapi-path-evidence p.path-result
11420− =/ parsed (parse file src)
11421− ?: ?=(%| -.parsed) [%| 'API source does not parse']
11422− =/ mod=module p.parsed
11423− =/ ordinary=(list def)
11424− (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11425− =/ prep=iprelude prepared.evidence
11426− ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
11427− =/ vals=(list term) (global-value-names ordinary)
11428− ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11429− =/ declared=(list term) (collect-mark-imports imports.mod)
11430− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
11431− ?~ mark-types [%| 'API declared marks need unsupported inference']
11432− =/ prelude=(unit ifile) `iface.prep
11433− =/ deps=jimports-result
11434− (resolve-jibb-imports imports.mod externals marks modules ~[file] values.prep molds.prep dependencies.evidence prelude)
11435− ?: ?=(%| -.deps) [%| p.deps]
11436− =/ molds=imolds (collect-simple-molds ordinary)
11437− =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
11438− =/ surs=(list term) (collect-sur-imports imports.mod)
11439− =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11440− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11441− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~]
11442− =/ mts=(each imold-types @t) (module-mold-types molds state)
11443− ?: ?=(%| -.mts) [%| p.mts]
11444− =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11445− ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
11446− [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
11447−:: Preserve the same graph context through supporting definitions.
11448−++ api-support-analysis-graph
11449− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11450− ^- (each iapi-support-evidence @t)
11451− =/ path-result (api-path-evidence-graph file src externals marks modules active cache prepared)
11452− ?: ?=(%| -.path-result) [%| p.path-result]
11453− =/ evidence=iapi-path-evidence p.path-result
11454− =/ parsed (parse file src)
11455− ?: ?=(%| -.parsed) [%| 'API source does not parse']
11456− =/ mod=module p.parsed
11457− =/ ordinary=(list def)
11458− (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11459− =/ prep=iprelude prepared.evidence
11460− ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
11461− =/ vals=(list term) (global-value-names ordinary)
11462− ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11463− =/ declared=(list term) (collect-mark-imports imports.mod)
11464− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
11465− ?~ mark-types [%| 'API declared marks need unsupported inference']
11466− =/ prelude=(unit ifile) `iface.prep
11467− =/ deps=jimports-result
11468− (resolve-jibb-imports imports.mod externals marks modules active values.prep molds.prep dependencies.evidence prelude)
11469− ?: ?=(%| -.deps) [%| p.deps]
11470− =/ molds=imolds (collect-simple-molds ordinary)
11471− =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
11472− =/ surs=(list term) (collect-sur-imports imports.mod)
11473− =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11474− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11475− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~]
11476− =/ mts=(each imold-types @t) (module-mold-types molds state)
11477− ?: ?=(%| -.mts) [%| p.mts]
11478− =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11479− ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
11480− [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
11481−::
11482−:: Type-analysis artifact for one plain request. The resolver may publish
11483−:: its interface only together with trusted source and reader evidence.
11484−:: No lowering or runtime validator exists.
11485−:: Value watchability remains unproved even for a watchable declaration.
11486−+$ ione-request-interface
11487− [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
11488−++ request-compatible-ask
11489− |= prelude=iprelude
11490− ^- (unit ischeme)
11491− =/ public=ifile iface.prelude
11492− ?. =(at.public /lib/jibb/prelude/jibb) ~
11493− =/ ask=(unit ischeme) (find-jibb-mold %ask public)
11494− ?~ ask ~
11495− ?. ?=([@ ~] vars.u.ask) ~
11496− ?. ?=(%union -.typ.u.ask) ~
11497− ?. =(origin.typ.u.ask `[/lib/jibb/internal/jibb %ask]) ~
11498− ?. (identity-union-parameters vars.u.ask args.typ.u.ask) ~
11499− =/ m=@ud i.vars.u.ask
11500− ?: (itype-var-is-atom m typ.u.ask) ~
11501− ?. (levy (itype-vars typ.u.ask) |=(n=@ud =(n m))) ~
11502− ?: (itype-has-tag typ.u.ask) ~
11503− =/ private=(list iwidth-dependency)
11504− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11505− ?. ?=([* ~] private) ~
11506− ?~ source.i.private ~
11507− =/ path=(unit ischeme) (find-jibb-mold %path public)
11508− ?~ path ~
11509− ?^ vars.u.path ~
11510− =/ path-type=itype [%collection %list ~[[%atom %ta]]]
11511− ?. =(typ.u.path path-type) ~
11512− =/ unit-template=(unit ischeme) (find-jibb-mold %unit public)
11513− ?~ unit-template ~
11514− ?. (standard-unit-template u.unit-template /lib/jibb/prelude/jibb) ~
11515− =/ state-unit=(unit itype) (template-apply u.unit-template ~[[%noun ~]])
11516− ?~ state-unit ~
11517− =/ path-unit=(unit itype) (template-apply u.unit-template ~[path-type])
11518− ?~ path-unit ~
11519− =/ output=itype [%cell [%face %state [%noun ~]] [%face %message [%var m]]]
11520− =/ agent-input=itype [%cell [%face %mark [%atom %tas]] [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]]
11521− =/ store-input=itype [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]
11522− =/ pure-case=itype [%cell [%const [%term %tas %pure '%pure']] [%face %value [%var m]]]
11523− =/ agent-case=itype
11524− [%cell [%const [%term %tas %agent '%agent']] [%cell [%face %api [%atom %t]] [%cell [%face %case [%atom %tas]] [%cell [%face %agent [%atom %tas]] [%cell [%face %path path-type] [%cell [%face %scry u.path-unit] [%face %receive [%fn agent-input output]]]]]]]]
11525− =/ store-case=itype
11526− [%cell [%const [%term %tas %store '%store']] [%cell [%face %module [%atom %t]] [%cell [%face %name [%atom %tas]] [%face %receive [%fn store-input output]]]]]
11527− ?. =(cases.typ.u.ask ~[pure-case agent-case store-case]) ~
11528− ask
11529−::
11530−:: The first supported standalone API has exactly one mark import and one
11531−:: plain path declaration, with no other definitions or imports. No partial
11532−:: success is published when source, schema, or a required mold is unknown.
11533−++ one-request-interface-source
11534− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
11535− ^- (each ione-request-interface @t)
11536− =/ out (api-support-analysis-source file src externals marks modules prepared)
11537− ?: ?=(%| -.out) [%| p.out]
11538− =/ support=iapi-support-evidence p.out
11539− =/ ev=iapi-path-evidence paths.support
11540− =/ parsed (parse file src)
11541− ?: ?=(%| -.parsed) [%| 'request source does not parse']
11542− =/ mod=module p.parsed
11543− ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
11544− ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
11545− ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
11546− ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
11547− =/ p=iapi-path-typed i.paths.ev
11548− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11549− ?~ parts [%| 'request components need unsupported inference']
11550− ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
11551− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
11552− ?^ scry.path.p [%| 'request scry needs unsupported inference']
11553− =/ valid-marks=?
11554− ?~ fold.u.parts ?=([* ~] marks.support)
11555− ?=([* [* ~]] marks.support)
11556− ?. valid-marks [%| 'request marks need unsupported inference']
11557− =/ fold-open=?
11558− ?~ fold.u.parts |
11559− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11560− ?: fold-open [%| 'request fold needs unsupported inference']
11561− ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11562− ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11563− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11564− ?~ ask [%| 'request ask needs unsupported inference']
11565− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
11566− ?~ result [%| 'request ask needs unsupported inference']
11567− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11568− =/ sample=itype
11569− ?^ fold.u.parts [%cell callback u.fold.u.parts]
11570− ?~ parameters.u.parts callback
11571− [%cell typ.i.parameters.u.parts callback]
11572− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11573− =/ exports=imold-types
11574− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11575− =/ prelude=iprelude prepared.ev
11576− =/ public=ifile iface.prelude
11577− ?~ source.public [%| 'request prelude source needs unsupported inference']
11578− =/ private=(list iwidth-dependency)
11579− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11580− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11581− ?~ source.i.private [%| 'request internal source needs unsupported inference']
11582− =/ req=irequest-evidence
11583− [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11584− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
11585− [%& [support u.parts interface]]
11586−:: Graph-aware request artifact; resolver use remains type-only.
11587−++ one-request-interface-graph
11588− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11589− ^- (each ione-request-interface @t)
11590− =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
11591− ?: ?=(%| -.out) [%| p.out]
11592− =/ support=iapi-support-evidence p.out
11593− =/ ev=iapi-path-evidence paths.support
11594− =/ parsed (parse file src)
11595− ?: ?=(%| -.parsed) [%| 'request source does not parse']
11596− =/ mod=module p.parsed
11597− ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
11598− ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
11599− ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
11600− ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
11601− =/ p=iapi-path-typed i.paths.ev
11602− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11603− ?~ parts [%| 'request components need unsupported inference']
11604− ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
11605− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
11606− ?^ scry.path.p [%| 'request scry needs unsupported inference']
11607− =/ valid-marks=?
11608− ?~ fold.u.parts ?=([* ~] marks.support)
11609− ?=([* [* ~]] marks.support)
11610− ?. valid-marks [%| 'request marks need unsupported inference']
11611− =/ fold-open=?
11612− ?~ fold.u.parts |
11613− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11614− ?: fold-open [%| 'request fold needs unsupported inference']
11615− ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11616− ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11617− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11618− ?~ ask [%| 'request ask needs unsupported inference']
11619− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
11620− ?~ result [%| 'request ask needs unsupported inference']
11621− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11622− =/ sample=itype
11623− ?^ fold.u.parts [%cell callback u.fold.u.parts]
11624− ?~ parameters.u.parts callback
11625− [%cell typ.i.parameters.u.parts callback]
11626− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11627− =/ exports=imold-types
11628− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11629− =/ prelude=iprelude prepared.ev
11630− =/ public=ifile iface.prelude
11631− ?~ source.public [%| 'request prelude source needs unsupported inference']
11632− =/ private=(list iwidth-dependency)
11633− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11634− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11635− ?~ source.i.private [%| 'request internal source needs unsupported inference']
11636− =/ req=irequest-evidence
11637− [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11638− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
11639− [%& [support u.parts interface]]
11640−::
11641−++ api-mark-exports
11642− |= [marks=(list term) all=(list term) externals=imark-externals]
11643− ^- imold-types
11644− ?~ marks ~
11645− =/ t=(unit itype) (find-imported-mark i.marks externals all)
11646− ?~ t $(marks t.marks)
11647− [[i.marks [u.t ~]] $(marks t.marks)]
11648−::
11649−:: Experimental direct poke-only API. Unsupported API declarations fail
11650−:: as a whole; supplied mark reader results retain their existing boundary.
11651−++ api-poke-interface
11652− |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
11653− ^- (unit ifile)
11654− ?: (lien defs.mod def-has-hole) ~
11655− ?. ?=([%ui %api @ %jibb ~] at) ~
11656− ?^ (duplicate-defs defs.mod) ~
11657− ?~ prelude ~
11658− ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
11659− =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
11660− ?~ poke ~
11661− ?. ?=(%union -.typ.u.poke) ~
11662− ?^ vars.u.poke ~
11663− =/ compatible=?
11664− %+ lien cases.typ.u.poke
11665− |= c=itype
11666− ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
11667− ?. compatible ~
11668− ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) ~
11669− ?. (levy imports.mod |=(i=import ?=(%mark -.i))) ~
11670− =/ marks=(list term) (collect-mark-imports imports.mod)
11671− ?. ?=([@ ~] marks) ~
11672− =/ ds=(list def) defs.mod
11673− ?. ?=([[%mold *] ~] ds) ~
11674− ?. =(%poke name.i.ds) ~
11675− =/ sh=shape shape.i.ds
11676− ?. ?=([%ref *] sh) ~
11677− ?. ?=([@ ~] names.sh) ~
11678− =/ n=term i.names.sh
11679− ?. (unique-value-name n marks) ~
11680− ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
11681− =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
11682− ?~ mark ~
11683− =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
11684− `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
11685−::
11686−:: Source-proven ordinary helpers validate each selected /sur dependency.
11687−:: Unused or less direct cores remain unsupported by this first interface.
11688−++ api-sur-covered
11689− |= [surs=(list term) defs=(list def) externals=iexternals all=(list term)]
11690− ^- ?
11691− ?~ surs &
11692− =/ found=(list def)
11693− %+ skim defs
11694− |= d=def
11695− ?. ?=(%mold -.d) |
11696− ?. ?=(%ref -.shape.d) |
11697− ?. ?=([@ [@ ~]] names.shape.d) |
11698− =(i.t.names.shape.d i.surs)
11699− ?~ found |
11700− =/ selected=def i.found
11701− ?. ?=(%mold -.selected) |
11702− =/ sh=shape shape.selected
11703− ?. ?=(%ref -.sh) |
11704− ?. ?=([@ [@ ~]] names.sh) |
11705− =/ checked=(unit itype) (find-imported-mold i.surs i.names.sh externals all)
11706− ?~ checked |
11707− $(surs t.surs)
11708−::
11709−+$ imulti-request-gates [values=ienv requests=(list irequest-evidence)]
11710−++ api-request-gates
11711− |= [paths=(list iapi-path-typed) ev=iapi-path-evidence ask=ischeme file=path src=@t public=@t internal=@t externals=iexternals marks=imark-externals fuel=@ud]
11712− ^- (unit imulti-request-gates)
11713− ?~ paths `[~ ~]
11714− ?: =(0 fuel) ~
11715− =/ p=iapi-path-typed i.paths
11716− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11717− ?~ parts ~
11718− ?. ?=(?(~ [* ~]) parameters.u.parts) ~
11719− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) ~
11720− ?^ scry.path.p ~
11721− ?^ (itype-vars reply-sample.u.parts) ~
11722− ?: (itype-has-tag reply-sample.u.parts) ~
11723− =/ open-fold=?
11724− ?~ fold.u.parts |
11725− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11726− ?: open-fold ~
11727− =/ result=(unit itype) (template-apply ask ~[[%var 0]])
11728− ?~ result ~
11729− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11730− =/ sample=itype
11731− ?^ fold.u.parts [%cell callback u.fold.u.parts]
11732− ?~ parameters.u.parts callback
11733− [%cell typ.i.parameters.u.parts callback]
11734− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11735− =/ prep=iprelude prepared.ev
11736− =/ req=irequest-evidence
11737− [file name.path.p p src public internal values.prep molds.prep externals marks]
11738− =/ rest=(unit imulti-request-gates)
11739− $(paths t.paths, fuel (dec fuel))
11740− ?~ rest ~
11741− `[[[name.path.p scheme] values.u.rest] [req requests.u.rest]]
11742−::
11743−++ api-poke-from-checked
11744− |= [file=path mod=module marks=imark-externals values=(list term) molds=(list term) prelude=(unit ifile)]
11745− ^- (unit [values=ienv derived=(list iderived)])
11746− =/ pokes=(list def)
11747− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
11748− ?~ pokes `[~ ~]
11749− ?. ?=([* ~] pokes) ~
11750− =/ declared=(list term) (collect-mark-imports imports.mod)
11751− =/ ns=(unit (list term)) (api-poke-mark-names pokes declared)
11752− ?~ ns ~
11753− ?. ?=([@ ~] u.ns) ~
11754− =/ matching=(list import)
11755− %+ skim imports.mod
11756− |= i=import
11757− ?. ?=(%mark -.i) |
11758− =(mark.i i.u.ns)
11759− ?. ?=([* ~] matching) ~
11760− =/ checked=(unit ifile)
11761− (api-poke-interface file mod(defs pokes, imports matching) marks values molds prelude)
11762− ?~ checked ~
11763− `[values.u.checked derived.u.checked]
11764−::
11765−:: The partial interface is published atomically: all paths, ordinary
11766−:: source definitions, declared marks and the poke must check. Unselected
11767−:: /sur bindings, runtime validation and value watchability remain unproved.
11768−++ multi-request-interface-graph
11769− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11770− ^- (each [iface=ifile cache=jcache] @t)
11771− =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
11772− ?: ?=(%| -.out) [%| p.out]
11773− =/ support=iapi-support-evidence p.out
11774− =/ ev=iapi-path-evidence paths.support
11775− =/ parsed (parse file src)
11776− ?: ?=(%| -.parsed) [%| 'request source does not parse']
11777− =/ mod=module p.parsed
11778− ?. (levy imports.mod |=(i=import ?=(?(%mark %sur) -.i)))
11779− [%| 'request imports need unsupported inference']
11780− =/ surs=(list term) (collect-sur-imports imports.mod)
11781− ?. (api-sur-covered surs defs.mod externals surs)
11782− [%| 'API source dependency needs unsupported inference']
11783− ?~ paths.ev [%| 'request count needs unsupported inference']
11784− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11785− ?~ ask [%| 'request ask needs unsupported inference']
11786− =/ prep=iprelude prepared.ev
11787− =/ public=ifile iface.prep
11788− ?~ source.public [%| 'request prelude source needs unsupported inference']
11789− =/ private=(list iwidth-dependency)
11790− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11791− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11792− ?~ source.i.private [%| 'request internal source needs unsupported inference']
11793− =/ gates=(unit imulti-request-gates)
11794− (api-request-gates paths.ev ev u.ask file src u.source.public u.source.i.private externals marks 256)
11795− ?~ gates [%| 'request paths need unsupported inference']
11796− =/ poke=(unit [values=ienv derived=(list iderived)])
11797− (api-poke-from-checked file mod marks values.prep molds.prep `public)
11798− ?~ poke [%| 'API poke needs unsupported inference']
11799− =/ mark-molds=imold-types
11800− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11801− =/ exports=imold-types (weld mark-molds molds.support)
11802− =/ names=(list term) (turn exports |=(m=[name=term template=ischeme] name.m))
11803− ?. (levy names |=(n=term (unique-value-name n names)))
11804− [%| 'API exported molds need unsupported inference']
11805− =/ env=ienv (weld values.u.gates (weld values.u.poke values.support))
11806− =/ graph=irequest-graph
11807− [(silt `(list path)`~[file]) requests.u.gates modules `public values.prep molds.prep externals marks]
11808− =/ iface=ifile
11809− [env exports file derived.u.poke elaborations.support ~ `src `graph]
11810− [%& [iface dependencies.ev]]
11811−::
11812++ infer-jibb-file
7171++ infer-jibb-file
11813 |= [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)]
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)]
11814 ^- jfile-result
7173 ^- jfile-result
7174+ ?: ?=([%ui %api *] at) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11815 =/ parsed (parse at src)
7175 =/ parsed (parse at src)
11816 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
7176 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
11817 =/ mod=module p.parsed
7177 =/ mod=module p.parsed
11818− =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11819− ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
11820− ?: ?=([%ui %api *] at)
11821− =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
11822− ?^ iface
11823− =/ checked=ifile u.iface(source `src, graph `[(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals])
11824− [%& [checked [[at checked] cache]]]
11825− ?~ prelude [%| (crip "API module needs unsupported inference: {(spud at)}")]
11826− =/ prepared=iprelude [u.prelude prelude-values prelude-molds]
11827− =/ narrow=?
11828− ?. ?=([[%mark *] ~] imports.mod) |
11829− ?. ?=([[%mold *] ~] defs.mod) |
11830− ?. =(%paths name.i.defs.mod) |
11831− !?=(%union -.shape.i.defs.mod)
11832− ?: narrow
11833− =/ request=(each ione-request-interface @t)
11834− (one-request-interface-graph at src externals mark-externals modules active cache `prepared)
11835− ?: ?=(%| -.request) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11836− =/ checked=ifile iface.p.request
11837− [%& [checked [[at checked] dependencies.paths.support.p.request]]]
11838− =/ multi=(each [iface=ifile cache=jcache] @t)
11839− (multi-request-interface-graph at src externals mark-externals modules active cache `prepared)
11840− ?: ?=(%| -.multi) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11841− [%& [iface.p.multi [[at iface.p.multi] cache.p.multi]]]
11842− ?. (module-scope-valid mod prelude-values prelude-molds)
7178+ ?. (module-scope-valid mod prelude-values prelude-molds) [%| (crip "module has conflicting names: {(spud at)}")]
11843− ?: (pending-declared-poke at mod prelude-values prelude-molds)
11844− [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
11845− [%| (crip "module has conflicting names: {(spud at)}")]
11846 =/ vals=(list term) (global-value-names defs.mod)
7179 =/ vals=(list term) (global-value-names defs.mod)
11847 ?: (lien vals |=(n=term =(n %main)))
7180 ?: (lien vals |=(n=term =(n %main)))
11848 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
7181 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
11849 =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
7182 =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
11850 ?: ?=(%| -.js) [%| p.js]
7183 ?: ?=(%| -.js) [%| p.js]
11851− =/ collected=grec-collected
11852− ?^ imports.mod [(collect-simple-molds defs.mod) *(map term shape)]
11853− (grec-collect-molds defs.mod)
11854− =/ molds=imolds molds.collected
7184+ =/ molds=imolds (collect-simple-molds defs.mod)
11855 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
7185 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
11856 =/ surs=(list term) (collect-sur-imports imports.mod)
7186 =/ surs=(list term) (collect-sur-imports imports.mod)
11857 =/ marks=(list term) (collect-mark-imports imports.mod)
7187 =/ marks=(list term) (collect-mark-imports imports.mod)
11858 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
7188 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11859 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7189 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11860− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~ ~ ~ ~]
7190+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude]
11861− :: Source and scope were checked above; preserve that exact root and prelude.
11862− :: This first integration only indexes import-free library sources.
11863− =/ index=(unit [at=path source=@t prelude=ifile shapes=(map term shape)])
11864− ?^ imports.mod ~
11865− ?~ prelude ~
11866− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude)
11867− ?~ standard ~
11868− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]]) ~
11869− =/ index=(map term shape) proofs.collected
11870− ?. !=(index *(map term shape)) ~
11871− ?: (lien molds |=(m=[name=term body=shape] =(%list name.m))) ~
11872− `[at src u.prelude index]
11873− =. grec-index.state index
11874 =/ mts=(each imold-types @t) (module-mold-types molds state)
7191 =/ mts=(each imold-types @t) (module-mold-types molds state)
11875 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
7192 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
11876− =/ resolution=iresolved
7193+ =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
11877− ?~ index
11878− (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
11879− (resolve-groups-core defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude index)
11880− =/ env=ienv env.resolution
11881 ?. (module-values-complete defs.mod env)
7194 ?. (module-values-complete defs.mod env)
11882 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
7195 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
11883− =/ initial=irequest-graph [(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals]
7196+ [%& [[env p.mts at] [[at [env p.mts at]] cache.p.js]]]
11884− =/ graph=(unit irequest-graph) (request-graph-merge resolved.p.js initial (add 1 (lent resolved.p.js)))
11885− ?~ graph [%| 'module request evidence needs unsupported inference']
11886− =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src graph]
11887− [%& [iface [[at iface] cache.p.js]]]
11888−::
11889−:: A source-bound analysis of one named mold, not a module, island,
11890−:: request, watchability or runtime check. The host owns the trusted
11891−:: prepared prelude, canonical paths and reader/source version identities.
11892−:: The 256-node cap covers only classification, not source/graph work.
11893−+$ igate-free-mold
11894− [at=path source=@t name=term prepared=iprelude externals=iexternals marks=imark-externals modules=jbundle dependencies=jcache mold=ischeme requested=@ud budget=@ud result=igate-free]
11895−++ gate-free-mold-source
11896− |= [file=path src=@t name=term externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude) fuel=@ud]
11897− ^- (each igate-free-mold @t)
11898− ?~ file [%| 'mold analysis needs a path ending in jibb']
11899− ?. =(%jibb (rear file)) [%| 'mold analysis needs a path ending in jibb']
11900− ?: |(=(file /lib/jibb/internal/jibb) =(file /lib/jibb/primitives/jibb))
11901− [%| 'the prelude internal modules are private']
11902− ?: ?=([%ui %api *] file) [%| 'API declarations need unsupported mold analysis']
11903− ?: ?=([%ui %stores *] file) [%| 'store declarations need unsupported mold analysis']
11904− =/ entries=jbundle (skim modules |=(m=jsource =(file at.m)))
11905− ?: (gth (lent entries) 1) [%| 'duplicate root module sources']
11906− =/ wrong-root=? ?~(entries | !=(source.i.entries src))
11907− ?: wrong-root [%| 'root module source does not match bundle']
11908− =/ parsed (parse file src)
11909− ?: ?=(%| -.parsed) [%| 'mold source does not parse']
11910− =/ mod=module p.parsed
11911− =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11912− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11913− ?~ prepared [%| 'mold analysis needs the prepared prelude']
11914− ?. (module-scope-valid mod values.u.prepared molds.u.prepared)
11915− [%| 'mold source has conflicting or unsupported scope']
11916− =/ selected=(list def)
11917− (skim defs.mod |=(d=def &(?=(%mold -.d) =(name.d name))))
11918− ?~ selected [%| 'selected mold is not declared']
11919− ?^ t.selected [%| 'selected mold is not unique']
11920− ?> ?=(%mold -.i.selected)
11921− =/ public=ifile iface.u.prepared
11922− =/ js=jimports-result
11923− (resolve-jibb-imports imports.mod externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
11924− ?: ?=(%| -.js) [%| p.js]
11925− =/ ms=imolds (collect-simple-molds defs.mod)
11926− =/ vals=(list term) (global-value-names defs.mod)
11927− =/ globals=(list term) (weld values.u.prepared (weld (import-binding-names imports.mod) vals))
11928− =/ surs=(list term) (collect-sur-imports imports.mod)
11929− =/ declared=(list term) (collect-mark-imports imports.mod)
11930− =/ reserved=(list term) (weld molds.u.prepared (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11931− =/ top=(list term) (turn ms |=(m=[name=term body=shape] name.m))
11932− =/ state=istate [0 ~ ~ ~ ms globals externals surs marks declared resolved.p.js reserved ~ ~ ~ | file top `public ~ 256 ~ ~ ~ ~]
11933− =/ inferred=(unit [template=ischeme state=istate])
11934− (infer-mold-template shape.i.selected state(active ~[name], in-mold &))
11935− ?~ inferred [%| 'selected mold needs unsupported inference']
11936− =/ template=ischeme template.u.inferred
11937− =. typ.template (label-direct-union typ.template shape.i.selected name state)
11938− =. typ.template (itype-normalize typ.template sub.state.u.inferred)
11939− =/ cap=@ud (min fuel 256)
11940− =/ analysis=igate-free (gate-free-type typ.template cap ~)
11941− [%& [file src name u.prepared externals marks modules cache.p.js template fuel cap analysis]]
11942::
7197::
11943:: +golden-types-with-modules fails closed for imports without prelude
7198:: +golden-types-with-modules fails closed for imports without prelude
11944:: scope. +golden-types-with-prelude resolves supported library graphs;
7199:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -11949,8 +7204,6 @@
11949 ^- @t
7204 ^- @t
11950 =/ parsed (parse file src)
7205 =/ parsed (parse file src)
11951 ?: ?=(%| -.parsed) (show-error src p.parsed)
7206 ?: ?=(%| -.parsed) (show-error src p.parsed)
11952− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11953− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11954 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
7207 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
11955 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
7208 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
11956 (golden-types-with-marks file src externals mark-externals)
7209 (golden-types-with-marks file src externals mark-externals)
@@ -11965,8 +7218,6 @@
11965 ^- @t
7218 ^- @t
11966 =/ parsed (parse file src)
7219 =/ parsed (parse file src)
11967 ?: ?=(%| -.parsed) (show-error src p.parsed)
7220 ?: ?=(%| -.parsed) (show-error src p.parsed)
11968− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11969− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11970 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
7221 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
11971 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
7222 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
11972 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
7223 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
@@ -11974,26 +7225,16 @@
11974 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
7225 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
11975 (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
7226 (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
11976::
7227::
11977−++ golden-types-with-prelude-and-internal
11978− |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t internal-source=@t]
11979− ^- @t
11980− =/ prepared=(unit iprelude) (prepare-prelude-with-internal prelude-source internal-source)
11981− (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
11982−::
11983++ golden-types-with-prepared-prelude
7228++ golden-types-with-prepared-prelude
11984 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
7229 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
11985 ^- @t
7230 ^- @t
11986 =/ parsed (parse file src)
7231 =/ parsed (parse file src)
11987 ?: ?=(%| -.parsed) (show-error src p.parsed)
7232 ?: ?=(%| -.parsed) (show-error src p.parsed)
11988− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11989− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11990 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
7233 ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
11991 =/ prelude-values=(list term) values.u.prepared
7234 =/ prelude-values=(list term) values.u.prepared
11992 =/ prelude-molds=(list term) molds.u.prepared
7235 =/ prelude-molds=(list term) molds.u.prepared
11993 =/ iface=(unit ifile) `iface.u.prepared
7236 =/ iface=(unit ifile) `iface.u.prepared
11994 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
7237 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
11995− ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
11996− 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
11997 'partial inference; module not checked\0amodule has conflicting names'
7238 'partial inference; module not checked\0amodule has conflicting names'
11998 =/ js=jimports-result
7239 =/ js=jimports-result
11999 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
7240 (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
@@ -12006,23 +7247,6 @@
12006:: entries, as [mark result] with the result from +read-mark:jibb-import.
7247:: entries, as [mark result] with the result from +read-mark:jibb-import.
12007:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
7248:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
12008::
7249::
12009−:: Callers pass unchanged structured reader results; graph validation
12010−:: remains in the existing bridge, and failures stay available lazily.
12011−++ reader-result-for-checker
12012− |= result=*
12013− ^- *
12014− ?: ?=([%ok *] result) [%& +.result]
12015− result
12016−::
12017−++ golden-types-with-reader-diagnostics
12018− |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
12019− ^- @t
12020− =/ ex=iexternals
12021− (turn externals |=(e=[module=term name=term result=*] [module.e name.e (reader-result-for-checker result.e)]))
12022− =/ mx=imark-externals
12023− (turn mark-externals |=(e=[mark=term result=*] [mark.e (reader-result-for-checker result.e)]))
12024− (golden-types-with-marks file src ex mx)
12025−::
12026++ golden-types-with-marks
7250++ golden-types-with-marks
12027 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
7251 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
12028 ^- @t
7252 ^- @t
@@ -12034,20 +7258,12 @@
12034 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
7258 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
12035 =/ parsed (parse file src)
7259 =/ parsed (parse file src)
12036 ?: ?=(%| -.parsed) (show-error src p.parsed)
7260 ?: ?=(%| -.parsed) (show-error src p.parsed)
12037− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
12038− ?^ duplicate (duplicate-fields-report file src u.duplicate)
12039− ?: (module-has-reserved-proj p.parsed)
12040− 'module has reserved proj name'
12041 =/ ds=(list def) defs.p.parsed
7261 =/ ds=(list def) defs.p.parsed
12042 =/ molds=imolds (collect-simple-molds ds)
7262 =/ molds=imolds (collect-simple-molds ds)
12043 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
7263 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
12044 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
7264 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
12045 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
7265 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
12046− =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
7266+ =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
12047− =/ cycles=(list icycle) (definite-value-cycles ds globals)
12048− =/ env=ienv env.resolution
12049− =/ source-defs=(map term def) (direct-checked-gates ds env)
12050− =/ heads=(unit igate-prelude-evidence) (direct-prelude-evidence ds prelude)
12051 =/ lines=(list @t) ~
7267 =/ lines=(list @t) ~
12052 |-
7268 |-
12053 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
7269 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -12056,38 +7272,10 @@
12056 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
7272 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
12057 ?. (unique-value-name name.d globals)
7273 ?. (unique-value-name name.d globals)
12058 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
7274 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
12059− =/ cycle=(list icycle) (skim cycles |=(c=icycle =(name.c name.d)))
12060− ?^ cycle
12061− =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
12062− $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
12063− ?: (lien grouped.resolution |=(n=term =(n name.d)))
12064− =/ found=(unit ischeme) (ienv-lookup name.d env)
12065− ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
12066− =/ typ=itype (canonical-itype typ.u.found vars.u.found)
12067− =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
12068− $(ds t.ds, lines [line lines])
12069 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
7275 =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
12070− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~ ~ ~ ~]
7276+ =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude])
12071− =. gate-defs.initial source-defs
12072− =. head-evidence.initial heads
12073− =. initial (reserve-def-caps val.d initial)
12074− =/ result=iresult
12075− ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
12076− (infer-recursive-gate d env initial)
12077− (infer-fragment val.d env initial)
12078 ?: ?=(%| -.result)
7277 ?: ?=(%| -.result)
12079 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
7278 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
12080− =. state.p.result (promote-restricted-numbers state.p.result env)
12081− =. 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)))
12082− =/ hole=(unit idiag) (unresolved-hole holes.state.p.result holes.initial state.p.result)
12083− ?^ hole
12084− $(ds t.ds, lines [(show-inference-diagnostic file src name.d u.hole) lines])
12085− =/ merged=(unit [first=icap second=icap])
12086− (merged-capitals caps.state.p.result sub.state.p.result)
12087− ?^ merged
12088− =/ diag=idiag
12089− ["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"]]]
12090− $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
12091 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
7279 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
12092 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
7280 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
12093 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
7281 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
@@ -12104,126 +7292,7 @@
12104 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7292 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
12105 ?: (gth (lent vars) 26)
7293 ?: (gth (lent vars) 26)
12106 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
7294 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
12107− ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
12108− $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
12109 =/ printable=itype (canonical-itype typ vars)
7295 =/ printable=itype (canonical-itype typ vars)
12110 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
7296 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
12111 $(ds t.ds, lines [line lines])
7297 $(ds t.ds, lines [line lines])
12112−:: Experimental per-module, source-derived recursive tree index.
12113−:: The two tags and the exact children/list/self layout are fixed-shape
12114−:: checks, so ordinary definitions incur no type-tree or source scans.
12115−++ grec-tagged-fields
12116− |= sh=shape
12117− ^- (unit [tag=@ fields=(list field)])
12118− ?. ?=(%cell -.sh) ~
12119− ?~ fields.sh ~
12120− =/ head=field i.fields.sh
12121− ?. ?=(%bare -.head) ~
12122− ?. ?=(%const -.shape.head) ~
12123− ?. &(?=(%term form.lit.shape.head) =(%tas aura.lit.shape.head)) ~
12124− `[val.lit.shape.head t.fields.sh]
12125−++ grec-tree-children
12126− |= [fs=(list field) param=@t]
12127− ^- (unit field)
12128− ?~ fs ~
12129− ?~ t.fs `i.fs
12130− ?^ t.t.fs ~
12131− =/ event=field i.fs
12132− =/ kids=field i.t.fs
12133− ?. &(?=(%face -.event) ?=(%face -.kids)) ~
12134− ?. !=(name.event name.kids) ~
12135− ?. ?=(%fn -.shape.event) ~
12136− ?. ?=(%aura -.sample.shape.event) ~
12137− ?. =(%t aura.sample.shape.event) ~
12138− ?. ?=(%tvar -.product.shape.event) ~
12139− ?. =(param name.product.shape.event) ~
12140− `kids
12141−::
12142−++ grec-tree-proof
12143− |= [name=term sh=shape]
12144− ^- ?
12145− ?. ?=(%generic -.sh) |
12146− ?. ?=([@ ~] vars.sh) |
12147− =/ param=@t i.vars.sh
12148− ?. ?=(%union -.body.sh) |
12149− ?. ?=([* [* ~]] cases.body.sh) |
12150− =/ a=(unit [tag=@ fields=(list field)]) (grec-tagged-fields i.cases.body.sh)
12151− =/ b=(unit [tag=@ fields=(list field)]) (grec-tagged-fields i.t.cases.body.sh)
12152− ?~ a |
12153− ?~ b |
12154− ?. !=(tag.u.a tag.u.b) |
12155− ?. ?=([* ~] fields.u.a) |
12156− =/ value=field i.fields.u.a
12157− ?. ?=(%face -.value) |
12158− ?. ?=(%aura -.shape.value) |
12159− ?. =(%t aura.shape.value) |
12160− =/ selected=(unit field) (grec-tree-children fields.u.b param)
12161− ?~ selected |
12162− =/ kids=field u.selected
12163− ?. ?=(%face -.kids) |
12164− ?. ?=(%apply -.shape.kids) |
12165− ?. =(ref.shape.kids ~[%list]) |
12166− ?. ?=([* ~] args.shape.kids) |
12167− =/ self=shape i.args.shape.kids
12168− ?. ?=(%apply -.self) |
12169− ?. =(ref.self ~[name]) |
12170− ?. ?=([* ~] args.self) |
12171− ?. ?=(%tvar -.i.args.self) |
12172− =(name.i.args.self param)
12173−+$ grec-collected [molds=imolds proofs=(map term shape)]
12174−:: Experimental one-layer analysis view, never an exported mold identity.
12175−++ grec-unfold-view
12176− |= [typ=itype fuel=@ud]
12177− ^- (unit [view=itype left=@ud])
12178− ?. ?=(%grec -.typ) ~
12179− ?: =(fuel 0) ~
12180− ?. ?=([* ~] args.typ) ~
12181− =/ sh=shape proof.typ
12182− ?. (grec-tree-proof name.typ sh) ~
12183− ?> ?=(%generic -.sh)
12184− ?> ?=([@ ~] vars.sh)
12185− ?> ?=(%union -.body.sh)
12186− ?> ?=([* [* ~]] cases.body.sh)
12187− =/ ca=shape i.cases.body.sh
12188− =/ cb=shape i.t.cases.body.sh
12189− ?> ?=(%cell -.ca)
12190− ?> ?=(%cell -.cb)
12191− ?> ?=([* [* ~]] fields.ca)
12192− ?> ?=([* *] fields.cb)
12193− =/ tag-a=field i.fields.ca
12194− =/ tag-b=field i.fields.cb
12195− ?> ?=(%bare -.tag-a)
12196− ?> ?=(%bare -.tag-b)
12197− ?> ?=(%const -.shape.tag-a)
12198− ?> ?=(%const -.shape.tag-b)
12199− =/ text-field=field i.t.fields.ca
12200− ?> ?=(%face -.text-field)
12201− =/ branch=(list field) t.fields.cb
12202− =/ kids=(unit field) (grec-tree-children branch i.vars.sh)
12203− ?~ kids ~
12204− ?> ?=(%face -.u.kids)
12205− =/ children=itype [%face name.u.kids [%collection %list ~[typ]]]
12206− ?> ?=(^ branch)
12207− =/ payload=itype
12208− ?~ t.branch children
12209− =/ event=field i.branch
12210− ?> ?=(%face -.event)
12211− [%cell [%face name.event [%fn [%atom %t] i.args.typ]] children]
12212− =/ leaf=itype [%cell [%const lit.shape.tag-a] [%face name.text-field [%atom %t]]]
12213− =/ node=itype [%cell [%const lit.shape.tag-b] payload]
12214− `[[%union ~[leaf node] ~ ~ ~] (dec fuel)]
12215−::
12216−++ grec-collect-molds
12217− |= ds=(list def)
12218− ^- grec-collected
12219− ?~ ds [~ *(map term shape)]
12220− =/ rest=grec-collected $(ds t.ds)
12221− ?. ?=(%mold -.i.ds) rest
12222− =/ name=term name.i.ds
12223− =/ body=shape shape.i.ds
12224− =/ proofs=(map term shape) proofs.rest
12225− =? proofs (grec-tree-proof name body) (~(put by proofs) name body)
12226− [[[name body] molds.rest] proofs]
12227−::
12228−
12229--
7298--
jibb-dev/lib/jibb/internal.jibbdeleted−31
@@ -1,31 +0,0 @@
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]
17−
18−:: Private compiler primitive wrappers; execution is a later milestone.
19−++ add-atom |= args=[A A] (raw-add.core args)
20−++ dec-atom |= atom=A (raw-dec.core atom)
21−
22−:: Transparent request data. Identity and path fields are writable and do not
23−:: prove a schema or watchability. A future executor must bind them to checked
24−:: source evidence and validate facts and state; generated receivers must
25−:: decode before calling typed replies or folds. Runtime validation, watch
26−:: provenance and effect execution are not implemented.
27−+$ agent-path (list.core @ta)
28−+$ ask |$ [M]
29− [%pure value=M]
30− [%agent api=@t case=@tas agent=@tas path=agent-path scry=(unit.core agent-path) receive=$-([mark=@tas state=(unit.core *) fact=*] [state=* message=M])]
31− [%store module=@t name=@tas receive=$-([state=(unit.core *) fact=*] [state=* message=M])]
jibb-dev/lib/jibb/prelude.jibb+66−163
@@ -1,9 +1,4 @@
1−/= internal /lib/jibb/internal
2−+$ poke poke.internal
3−+$ qath qath.internal
4−
5:: Initial prelude functions. The rest of the inventory is still to come.
1:: Initial prelude functions. The rest of the inventory is still to come.
6−
7++ same |= x=A x
2++ same |= x=A x
8
3
9++ head |= p=[A B]
4++ head |= p=[A B]
@@ -42,18 +37,16 @@
42++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
43 ?- args
38 ?- args
44 [xs ys]
39 [xs ys]
45− ^- (list A)
46− ?- xs
40+ ?- xs
47− ~ ys
41+ ~ ys
48− [item rest] [item (weld rest ys)]
42+ [item rest] [item (weld rest ys)]
49
43
50++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
51 ?- args
45 ?- args
52 [xs f]
46 [xs f]
53− ^- (list B)
54− ?- xs
47+ ?- xs
55− ~ ~
48+ ~ ~
56− [item rest] [(f item) (turn rest f)]
49+ [item rest] [(f item) (turn rest f)]
57
50
58+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
59
52
@@ -101,14 +94,6 @@
101
94
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
95+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
103
96
104−++ like |= [f=$-(A B) result=(like A)]
105− ++ mapped
106− ^- (unit [p=B q=nail])
107− ?- q.result
108− ~ ~
109− [~ value] `[p=(f p.value) q=q.value]
110− ^- (like B) [p=p.result q=mapped]
111−
112++ wonk |= veq=(like A)
97++ wonk |= veq=(like A)
113 ?- q.veq
98 ?- q.veq
114 ~ !!
99 ~ !!
@@ -153,34 +138,27 @@
153 (reverse-into xs ~)
138 (reverse-into xs ~)
154
139
155++ drop |= maybe=(unit A)
140++ drop |= maybe=(unit A)
156− ^- (list A)
157− ?- maybe
141+ ?- maybe
158− ~ ~
142+ ~ ~
159− [~ value] [value ~]
143+ [~ value] [value ~]
160−
161−++ bond |= fallback=$-(~ A)
162− |= maybe=(unit A)
163− ?- maybe
164− ~ (fallback ~)
165− [~ value] value
166
144
167++ bind |= args=[(unit A) $-(A B)]
145++ bind |= args=[(unit A) $-(A B)]
168 ?- args
146 ?- args
169− [maybe f] ^- (unit B)
147+ [maybe f]
170 ?- maybe
148 ?- maybe
171 ~ ~
149 ~ ~
172 [~ value] `(f value)
150 [~ value] `(f value)
173
151
174++ biff |= args=[(unit A) $-(A (unit B))]
152++ biff |= args=[(unit A) $-(A (unit B))]
175 ?- args
153 ?- args
176− [maybe f] ^- (unit B)
154+ [maybe f]
177 ?- maybe
155 ?- maybe
178 ~ ~
156 ~ ~
179 [~ value] (f value)
157 [~ value] (f value)
180
158
181++ both |= args=[(unit A) (unit B)]
159++ both |= args=[(unit A) (unit B)]
182 ?- args
160 ?- args
183− [first second] ^- (unit [A B])
161+ [first second]
184 ?- first
162 ?- first
185 ~ ~
163 ~ ~
186 [~ a]
164 [~ a]
@@ -188,19 +166,9 @@
188 ~ ~
166 ~ ~
189 [~ b] `[a b]
167 [~ b] `[a b]
190
168
191−++ clap |= args=[(unit A) (unit A) $-([A A] A)]
192− ?- args
193− [first second combine] ^- (unit A)
194− ?- first
195− ~ second
196− [~ a]
197− ?- second
198− ~ first
199− [~ b] `(combine a b)
200−
201++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
169++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
202 ?- args
170 ?- args
203− [first second combine] ^- (unit C)
171+ [first second combine]
204 ?- first
172 ?- first
205 ~ ~
173 ~ ~
206 [~ a]
174 [~ a]
@@ -210,45 +178,43 @@
210
178
211++ skim |= args=[(list A) $-(A ?)]
179++ skim |= args=[(list A) $-(A ?)]
212 ?- args
180 ?- args
213− [xs predicate] ^- (list A)
181+ [xs predicate]
214− ?- xs
182+ ?- xs
215− ~ ~
183+ ~ ~
216− [item rest]
184+ [item rest]
217− ?- (predicate item)
185+ ?- (predicate item)
218− %.y [item (skim rest predicate)]
186+ %.y [item (skim rest predicate)]
219− %.n (skim rest predicate)
187+ %.n (skim rest predicate)
220
188
221++ skip |= args=[(list A) $-(A ?)]
189++ skip |= args=[(list A) $-(A ?)]
222 ?- args
190 ?- args
223− [xs predicate] ^- (list A)
191+ [xs predicate]
224− ?- xs
192+ ?- xs
225− ~ ~
193+ ~ ~
226− [item rest]
194+ [item rest]
227− ?- (predicate item)
195+ ?- (predicate item)
228− %.y (skip rest predicate)
196+ %.y (skip rest predicate)
229− %.n [item (skip rest predicate)]
197+ %.n [item (skip rest predicate)]
230
198
231++ levy |= args=[(list A) $-(A ?)]
199++ levy |= args=[(list A) $-(A ?)]
232− ^- ?
200+ ?- args
233− ?- args
201+ [xs predicate]
234− [xs predicate]
235− ?- xs
202+ ?- xs
236− ~ %.y
203+ ~ %.y
237− [item rest]
204+ [item rest]
238− ?- (predicate item)
205+ ?- (predicate item)
239− %.y (levy rest predicate)
206+ %.y (levy rest predicate)
240− %.n %.n
207+ %.n %.n
241
208
242++ lien |= args=[(list A) $-(A ?)]
209++ lien |= args=[(list A) $-(A ?)]
243− ^- ?
210+ ?- args
244− ?- args
211+ [xs predicate]
245− [xs predicate]
246− ?- xs
212+ ?- xs
247− ~ %.n
213+ ~ %.n
248− [item rest]
214+ [item rest]
249− ?- (predicate item)
215+ ?- (predicate item)
250− %.y %.y
216+ %.y %.y
251− %.n (lien rest predicate)
217+ %.n (lien rest predicate)
252
218
253++ roll |= args=[(list A) B $-([A B] B)]
219++ roll |= args=[(list A) B $-([A B] B)]
254 ?- args
220 ?- args
@@ -266,39 +232,37 @@
266
232
267++ flit |= predicate=$-(A ?)
233++ flit |= predicate=$-(A ?)
268 |= value=A
234 |= value=A
269− ^- (unit A)
270− ?- (predicate value)
235+ ?- (predicate value)
271− %.y `value
236+ %.y `value
272− %.n ~
237+ %.n ~
273
238
274++ murn |= args=[(list A) $-(A (unit B))]
239++ murn |= args=[(list A) $-(A (unit B))]
275 ?- args
240 ?- args
276− [xs f] ^- (list B)
241+ [xs f]
277− ?- xs
242+ ?- xs
278− ~ ~
243+ ~ ~
279− [item rest]
244+ [item rest]
280− ?- (f item)
245+ ?- (f item)
281− ~ (murn rest f)
246+ ~ (murn rest f)
282− [~ value] [value (murn rest f)]
247+ [~ value] [value (murn rest f)]
283
248
284++ join |= args=[A (list A)]
249++ join |= args=[A (list A)]
285 ?- args
250 ?- args
286− [separator xs] ^- (list A)
251+ [separator xs]
287− ?- xs
252+ ?- xs
288− ~ ~
253+ ~ ~
289− [item rest]
254+ [item rest]
290− ?- rest
255+ ?- rest
291− ~ [item ~]
256+ ~ [item ~]
292− [next more] [item [separator (join separator rest)]]
257+ [next more] [item [separator (join separator rest)]]
293
258
294++ snip |= xs=(list A)
259++ snip |= xs=(list A)
295− ^- (list A)
296− ?- xs
260+ ?- xs
297− ~ ~
261+ ~ ~
298− [item rest]
262+ [item rest]
299− ?- rest
263+ ?- rest
300− ~ ~
264+ ~ ~
301− [next more] [item (snip rest)]
265+ [next more] [item (snip rest)]
302
266
303++ rear |= xs=(list A)
267++ rear |= xs=(list A)
304 ?- xs
268 ?- xs
@@ -307,64 +271,3 @@
307 ?- rest
271 ?- rest
308 ~ item
272 ~ item
309 [next more] (rear rest)
273 [next more] (rear rest)
310−
311−++ cork |= gates=[$-(A B) $-(B C)]
312− ?- gates
313− [f g] |= x=A (g (f x))
314−
315−++ corl |= gates=[$-(B C) $-(A B)]
316− ?- gates
317− [f g] |= x=A (f (g x))
318−
319−++ cury |= args=[$-([A B] C) A]
320− ?- args
321− [f a] |= b=B (f a b)
322−
323−++ curr |= args=[$-([A B] C) B]
324− ?- args
325− [f b] |= a=A (f a b)
326−
327−+$ cmd |$ [M]
328− [%poke p=poke reply=$-((unit @t) M)]
329− [%go url=@t]
330− [%wait gap=@dr msg=M]
331− [%now reply=$-(@da M)]
332− [%who reply=$-(@p M)]
333−
334−++ gth |= args=[A A] (gth-atom.internal args)
335−++ add |= args=[A A] (add-atom.internal args)
336−++ dec |= atom=A (dec-atom.internal atom)
337−
338−+$ ask |$ [M] (ask.internal M)
339−++ pure |= x=M ^- (ask M) [%pure x]
340−
341−:: This mold describes the value; island watchability needs separate proof.
342−+$ sub |$ [M]
343− [%watch a=(ask M)]
344− [%every gap=@dr reply=$-(@da M)]
345− [%url reply=$-(path M)]
346−
347−:: Count a finite list with the source-backed addition gate.
348−++ lent |= xs=(list A)
349− ^- @ud
350− ?- xs
351− ~ 0
352− [item rest] (add 1 (lent rest))
353−
354−++ lth |= args=[A A]
355− ?- args
356− [x y] (gth y x)
357−
358−++ gte |= args=[A A]
359− ?- args
360− [x y] (not (gth y x))
361−
362−++ lte |= args=[A A]
363− ?- args
364− [x y] (not (gth x y))
365−
366−++ zing |= xss=(list (list A))
367− ^- (list A)
368− ?- xss
369− ~ ~
370− [xs rest] (weld xs (zing rest))
tests/clay-fixtures/mark-update-import-expected.txtdeleted−1
@@ -1 +0,0 @@
1−"(union [added item=[id=@ud [done=(union @f:0 @f:1) text=@t]]] [toggled id=@ud])"
tests/clay-fixtures/mark-update-import.txtdeleted−9
@@ -1,9 +0,0 @@
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.txtdeleted−1
@@ -1 +0,0 @@
1−[%.y %.y %.y]
tests/clay-fixtures/tlon-mop.txtdeleted−20
@@ -1,20 +0,0 @@
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,4 +1,3 @@
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.txtdeleted−1
@@ -1 +0,0 @@
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 sent-at] t
13+ [t %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 sent-at
77+13:14 name at
78−13:21 tight glyph ]
78+13:16 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 sent-at))
36+ (cell 13:5 (bind 13:6 t) (lit 13:8 %sent) (bind 13:14 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.txtdeleted−3
@@ -1,3 +0,0 @@
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,4 +1,3 @@
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.txtdeleted−1
@@ -1 +0,0 @@
1−# no module fixtures
tests/golden/doc-grammar-06-cart-store/types.txtdeleted−2
@@ -1,2 +0,0 @@
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: "`poke`, `ask` and `qath` are transparent types, defined in the internal prelude and re-exported normally; callers can construct and inspect their values."
1+source: Grammar tab, Molds: "Opaque: `poke`, `ask` and `qath`, built only by derived gates, `pure` and application-path literals."
2−tests: the effect and application-path types by name
2+tests: the opaque molds by name
3expect: parses
3expect: parses
tests/golden/parser-hole-parameter-rejected/about.txtdeleted−3
@@ -1,3 +0,0 @@
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.jibbdeleted−1
@@ -1 +0,0 @@
1−+$ bad |$ [_] @t
tests/golden/parser-hole-parameter-rejected/tokens.txtdeleted−8
@@ -1,8 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
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.jibbdeleted−1
@@ -1 +0,0 @@
1−+$ path /[id= _]
tests/golden/parser-hole-path-space/tokens.txtdeleted−9
@@ -1,9 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
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.jibbdeleted−4
@@ -1,4 +0,0 @@
1−+$ root /_
2−+$ child /item/_x
3−++ show %/_
4−+$ inferred /items/[id=_]
tests/golden/parser-hole-path/tokens.txtdeleted−28
@@ -1,28 +0,0 @@
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.txtdeleted−5
@@ -1,5 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
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.jibbdeleted−3
@@ -1,3 +0,0 @@
1−++ bad |= x=@t
2− ?- x
3− _ "no"
tests/golden/parser-hole-pattern-rejected/tokens.txtdeleted−15
@@ -1,15 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
1−/tests/golden/parser-hole-pattern-rejected/source.jibb:3:5: expected a pattern, found `_`
2− _ "no"
3− ^
tests/golden/parser-hole-shapes/about.txtdeleted−3
@@ -1,3 +0,0 @@
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.jibbdeleted−11
@@ -1,11 +0,0 @@
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.txtdeleted−121
@@ -1,121 +0,0 @@
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.txtdeleted−47
@@ -1,47 +0,0 @@
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.txtdeleted−3
@@ -1,3 +0,0 @@
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.jibbdeleted−1
@@ -1 +0,0 @@
1−++ bad _
tests/golden/parser-hole-value-rejected/tokens.txtdeleted−4
@@ -1,4 +0,0 @@
1−1:1 glyph ++
2−1:4 name bad
3−1:8 glyph _
4−1:9 NEWLINE
tests/golden/parser-hole-value-rejected/tree.txtdeleted−3
@@ -1,3 +0,0 @@
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+6−16
@@ -37,18 +37,16 @@
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)
41− ?- xs
40+ ?- xs
42− ~ ys
41+ ~ ys
43− [item rest] [item (weld rest ys)]
42+ [item rest] [item (weld rest ys)]
44
43
45++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
46 ?- args
45 ?- args
47 [xs f]
46 [xs f]
48− ^- (list B)
49− ?- xs
47+ ?- xs
50− ~ ~
48+ ~ ~
51− [item rest] [(f item) (turn rest f)]
49+ [item rest] [(f item) (turn rest f)]
52
50
53+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
54
52
@@ -96,14 +94,6 @@
96
94
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
95+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
98
96
99−++ like |= [f=$-(A B) result=(like A)]
100− ++ mapped
101− ^- (unit [p=B q=nail])
102− ?- q.result
103− ~ ~
104− [~ value] `[p=(f p.value) q=q.value]
105− ^- (like B) [p=p.result q=mapped]
106−
107++ wonk |= veq=(like A)
97++ wonk |= veq=(like A)
108 ?- q.veq
98 ?- q.veq
109 ~ !!
99 ~ !!
tests/golden/prelude-1c-structural/tokens.txt+442−531
@@ -190,617 +190,528 @@
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 glyph (
194+40:10 name xs
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
19841:9 INDENT
19541:9 INDENT
199−41:9 glyph ?-
200−41:12 name xs
201−42:11 INDENT
202−42:11 lit ~
196+41:9 lit ~
203−42:13 name ys
197+41:11 name ys
204−43:11 NEWLINE
198+42:9 NEWLINE
205−43:11 glyph [
199+42:9 glyph [
206−43:12 tight name item
200+42:10 tight name item
207−43:17 name rest
201+42:15 name rest
208−43:21 tight glyph ]
202+42:19 tight glyph ]
209−43:23 glyph [
203+42:21 glyph [
210−43:24 tight name item
204+42:22 tight name item
211−43:29 glyph (
205+42:27 glyph (
212−43:30 tight name weld
206+42:28 tight name weld
213−43:35 name rest
207+42:33 name rest
214−43:40 name ys
208+42:38 name ys
215−43:42 tight glyph )
209+42:40 tight glyph )
216−43:43 tight glyph ]
210+42:41 tight glyph ]
217−45:1 DEDENT
211+44:1 DEDENT
218−45:1 DEDENT
219−45:1 DEDENT
212+44:1 DEDENT
220−45:1 DEDENT
213+44:1 DEDENT
221−45:1 DEDENT
214+44:1 DEDENT
222−45:1 NEWLINE
215+44:1 NEWLINE
223−45:1 glyph ++
216+44:1 glyph ++
224−45:4 name turn
217+44:4 name turn
225−45:9 glyph |=
218+44:9 glyph |=
226−45:12 name args
219+44:12 name args
227−45:16 tight glyph =
220+44:16 tight glyph =
228−45:17 tight glyph [
221+44:17 tight glyph [
229−45:18 tight glyph (
222+44:18 tight glyph (
230−45:19 tight name list
223+44:19 tight name list
231−45:24 tvar A
224+44:24 tvar A
232−45:25 tight glyph )
225+44:25 tight glyph )
233−45:27 glyph $-(
226+44:27 glyph $-(
234−45:30 tight tvar A
227+44:30 tight tvar A
235−45:32 tvar B
228+44:32 tvar B
236−45:33 tight glyph )
229+44:33 tight glyph )
237−45:34 tight glyph ]
230+44:34 tight glyph ]
238−46:3 INDENT
231+45:3 INDENT
239−46:3 glyph ?-
232+45:3 glyph ?-
240−46:6 name args
233+45:6 name args
241−47:5 INDENT
234+46:5 INDENT
242−47:5 glyph [
235+46:5 glyph [
243−47:6 tight name xs
236+46:6 tight name xs
244−47:9 name f
237+46:9 name f
245−47:10 tight glyph ]
238+46:10 tight glyph ]
246−48:7 INDENT
239+47:7 INDENT
247−48:7 glyph ^-
240+47:7 glyph ?-
248−48:10 glyph (
241+47:10 name xs
249−48:11 tight name list
250−48:16 tvar B
251−48:17 tight glyph )
252−49:9 INDENT
242+48:9 INDENT
253−49:9 glyph ?-
254−49:12 name xs
255−50:11 INDENT
256−50:11 lit ~
243+48:9 lit ~
257−50:13 lit ~
244+48:11 lit ~
258−51:11 NEWLINE
245+49:9 NEWLINE
259−51:11 glyph [
246+49:9 glyph [
260−51:12 tight name item
247+49:10 tight name item
261−51:17 name rest
248+49:15 name rest
262−51:21 tight glyph ]
249+49:19 tight glyph ]
263−51:23 glyph [
250+49:21 glyph [
264−51:24 tight glyph (
251+49:22 tight glyph (
265−51:25 tight name f
252+49:23 tight name f
266−51:27 name item
253+49:25 name item
254+49:29 tight glyph )
267−51:31 tight glyph )
255+49:31 glyph (
268−51:33 glyph (
269−51:34 tight name turn
256+49:32 tight name turn
270−51:39 name rest
257+49:37 name rest
271−51:44 name f
258+49:42 name f
272−51:45 tight glyph )
259+49:43 tight glyph )
273−51:46 tight glyph ]
260+49:44 tight glyph ]
274−53:1 DEDENT
261+51:1 DEDENT
275−53:1 DEDENT
262+51:1 DEDENT
276−53:1 DEDENT
263+51:1 DEDENT
277−53:1 DEDENT
264+51:1 DEDENT
278−53:1 DEDENT
265+51:1 NEWLINE
266+51:1 glyph +$
267+51:4 name dime
268+51:9 glyph [
269+51:10 tight name p
270+51:11 tight glyph =
271+51:12 tight aura @ta
272+51:16 name q
273+51:17 tight glyph =
274+51:18 tight aura @
275+51:19 tight glyph ]
27953:1 NEWLINE
27653:1 NEWLINE
28053:1 glyph +$
27753:1 glyph +$
281−53:4 name dime
278+53:4 name hair
28253:9 glyph [
27953:9 glyph [
28353:10 tight name p
28053:10 tight name p
28453:11 tight glyph =
28153:11 tight glyph =
285−53:12 tight aura @ta
282+53:12 tight aura @ud
28653:16 name q
28353:16 name q
28753:17 tight glyph =
28453:17 tight glyph =
288−53:18 tight aura @
285+53:18 tight aura @ud
289−53:19 tight glyph ]
286+53:21 tight glyph ]
29055:1 NEWLINE
28755:1 NEWLINE
29155:1 glyph +$
28855:1 glyph +$
292−55:4 name hair
289+55:4 name pint
29355:9 glyph [
29055:9 glyph [
29455:10 tight name p
29155:10 tight name p
29555:11 tight glyph =
29255:11 tight glyph =
296−55:12 tight aura @ud
293+55:12 tight glyph [
297−55:16 name q
294+55:13 tight name p
298−55:17 tight glyph =
295+55:14 tight glyph =
296+55:15 tight aura @
297+55:17 name q
299−55:18 tight aura @ud
298+55:18 tight glyph =
299+55:19 tight aura @
300+55:20 tight glyph ]
301+55:22 name q
302+55:23 tight glyph =
303+55:24 tight glyph [
304+55:25 tight name p
305+55:26 tight glyph =
306+55:27 tight aura @
307+55:29 name q
308+55:30 tight glyph =
309+55:31 tight aura @
310+55:32 tight glyph ]
300−55:21 tight glyph ]
311+55:33 tight glyph ]
30157:1 NEWLINE
31257:1 NEWLINE
30257:1 glyph +$
31357:1 glyph +$
303−57:4 name pint
314+57:4 name coin
315+58:3 INDENT
316+58:3 glyph [
317+58:4 tight lit %$
318+58:7 name p
319+58:8 tight glyph =
320+58:9 tight name dime
304−57:9 glyph [
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
305−57:10 tight name p
325+59:10 name p
306−57:11 tight glyph =
326+59:11 tight glyph =
307−57:12 tight glyph [
327+59:12 tight glyph *
308−57:13 tight name p
328+59:13 tight glyph ]
309−57:14 tight glyph =
329+60:3 NEWLINE
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 %$
331+60:4 tight lit %many
332−60:7 name p
333−60:8 tight glyph =
334−60:9 tight name dime
335−60:13 tight glyph ]
336−61:3 NEWLINE
337−61:3 glyph [
338−61:4 tight lit %blob
339−61:10 name p
340−61:11 tight glyph =
341−61:12 tight glyph *
342−61:13 tight glyph ]
343−62:3 NEWLINE
344−62:3 glyph [
345−62:4 tight lit %many
346−62:10 name p
332+60:10 name p
347−62:11 tight glyph =
333+60:11 tight glyph =
348−62:12 tight glyph (
334+60:12 tight glyph (
349−62:13 tight name list
335+60:13 tight name list
350−62:18 name coin
336+60:18 name coin
351−62:22 tight glyph )
337+60:22 tight glyph )
352−62:23 tight glyph ]
338+60:23 tight glyph ]
353−64:1 DEDENT
339+62:1 DEDENT
340+62:1 NEWLINE
341+62:1 glyph +$
342+62:4 name pair
343+62:9 glyph |$
344+62:12 glyph [
345+62:13 tight tvar A
346+62:15 tvar B
347+62:16 tight glyph ]
348+62:18 glyph [
349+62:19 tight name p
350+62:20 tight glyph =
351+62:21 tight tvar A
352+62:23 name q
353+62:24 tight glyph =
354+62:25 tight tvar B
355+62:26 tight glyph ]
35464:1 NEWLINE
35664:1 NEWLINE
35564:1 glyph +$
35764:1 glyph +$
356−64:4 name pair
358+64:4 name trel
35764:9 glyph |$
35964:9 glyph |$
35864:12 glyph [
36064:12 glyph [
35964:13 tight tvar A
36164:13 tight tvar A
36064:15 tvar B
36264:15 tvar B
361−64:16 tight glyph ]
363+64:17 tvar C
364+64:18 tight glyph ]
362−64:18 glyph [
365+64:20 glyph [
363−64:19 tight name p
364−64:20 tight glyph =
365−64:21 tight tvar A
366+64:21 tight name p
366−64:23 name q
367+64:22 tight glyph =
367−64:24 tight glyph =
368+64:23 tight tvar A
369+64:25 name q
370+64:26 tight glyph =
368−64:25 tight tvar B
371+64:27 tight tvar B
372+64:29 name r
373+64:30 tight glyph =
374+64:31 tight tvar C
369−64:26 tight glyph ]
375+64:32 tight glyph ]
37066:1 NEWLINE
37666:1 NEWLINE
37166:1 glyph +$
37766:1 glyph +$
372−66:4 name trel
378+66:4 name qual
37366:9 glyph |$
37966:9 glyph |$
37466:12 glyph [
38066:12 glyph [
37566:13 tight tvar A
38166:13 tight tvar A
37666:15 tvar B
38266:15 tvar B
37766:17 tvar C
38366:17 tvar C
378−66:18 tight glyph ]
384+66:19 tvar D
385+66:20 tight glyph ]
379−66:20 glyph [
386+66:22 glyph [
380−66:21 tight name p
387+66:23 tight name p
381−66:22 tight glyph =
388+66:24 tight glyph =
382−66:23 tight tvar A
389+66:25 tight tvar A
383−66:25 name q
390+66:27 name q
384−66:26 tight glyph =
391+66:28 tight glyph =
385−66:27 tight tvar B
392+66:29 tight tvar B
386−66:29 name r
393+66:31 name r
387−66:30 tight glyph =
388−66:31 tight tvar C
389−66:32 tight glyph ]
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 ]
39068:1 NEWLINE
40068:1 NEWLINE
39168:1 glyph +$
40168:1 glyph +$
392−68:4 name qual
402+68:4 name cord
393−68:9 glyph |$
403+68:9 aura @t
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 ]
41470:1 NEWLINE
40470:1 NEWLINE
41570:1 glyph +$
40570:1 glyph +$
416−70:4 name cord
406+70:4 name knot
417−70:9 aura @t
407+70:9 aura @ta
41872:1 NEWLINE
40872:1 NEWLINE
41972:1 glyph +$
40972:1 glyph +$
420−72:4 name knot
410+72:4 name tape
411+72:9 glyph (
412+72:10 tight name list
421−72:9 aura @ta
413+72:15 aura @tD
414+72:18 tight glyph )
42274:1 NEWLINE
41574:1 NEWLINE
42374:1 glyph +$
41674:1 glyph +$
424−74:4 name tape
417+74:4 name path
42574:9 glyph (
41874:9 glyph (
42674:10 tight name list
41974:10 tight name list
427−74:15 aura @tD
420+74:15 name knot
428−74:18 tight glyph )
421+74:19 tight glyph )
42976:1 NEWLINE
42276:1 NEWLINE
43076:1 glyph +$
42376:1 glyph +$
431−76:4 name path
424+76:4 name tank
432−76:9 glyph (
433−76:10 tight name list
434−76:15 name knot
435−76:19 tight glyph )
436−78:1 NEWLINE
437−78:1 glyph +$
438−78:4 name tank
439−79:3 INDENT
425+77:3 INDENT
440−79:3 name cord
426+77:3 name cord
427+78:3 NEWLINE
428+78:3 glyph [
429+78:4 tight lit %leaf
430+78:10 name p
431+78:11 tight glyph =
432+78:12 tight name tape
433+78:16 tight glyph ]
434+79:3 NEWLINE
435+79:3 glyph [
436+79:4 tight lit %palm
437+79:10 name p
438+79:11 tight glyph =
439+79:12 tight glyph (
440+79:13 tight name qual
441+79:18 name tape
442+79:23 name tape
443+79:28 name tape
444+79:33 name tape
445+79:37 tight glyph )
446+79:39 name q
447+79:40 tight glyph =
448+79:41 tight glyph (
449+79:42 tight name list
450+79:47 name tank
451+79:51 tight glyph )
452+79:52 tight glyph ]
44180:3 NEWLINE
45380:3 NEWLINE
44280:3 glyph [
45480:3 glyph [
443−80:4 tight lit %leaf
455+80:4 tight lit %rose
44480:10 name p
45680:10 name p
44580:11 tight glyph =
45780:11 tight glyph =
446−80:12 tight name tape
458+80:12 tight glyph (
447−80:16 tight glyph ]
448−81:3 NEWLINE
449−81:3 glyph [
450−81:4 tight lit %palm
451−81:10 name p
452−81:11 tight glyph =
453−81:12 tight glyph (
454−81:13 tight name qual
459+80:13 tight name trel
455−81:18 name tape
460+80:18 name tape
456−81:23 name tape
461+80:23 name tape
457−81:28 name tape
462+80:28 name tape
458−81:33 name tape
463+80:32 tight glyph )
464+80:34 name q
465+80:35 tight glyph =
466+80:36 tight glyph (
459−81:37 tight glyph )
467+80:37 tight name list
460−81:39 name q
468+80:42 name tank
461−81:40 tight glyph =
469+80:46 tight glyph )
462−81:41 tight glyph (
463−81:42 tight name list
464−81:47 name tank
465−81:51 tight glyph )
470+80:47 tight glyph ]
466−81:52 tight glyph ]
471+82:1 DEDENT
467−82:3 NEWLINE
472+82:1 NEWLINE
468−82:3 glyph [
473+82:1 glyph +$
469−82:4 tight lit %rose
474+82:4 name nail
475+82:9 glyph [
470−82:10 name p
476+82:10 tight name p
47182:11 tight glyph =
47782:11 tight glyph =
472−82:12 tight glyph (
478+82:12 tight name hair
473−82:13 tight name trel
479+82:17 name q
480+82:18 tight glyph =
474−82:18 name tape
481+82:19 tight name tape
475−82:23 name tape
476−82:28 name tape
477−82:32 tight glyph )
478−82:34 name q
479−82:35 tight glyph =
480−82:36 tight glyph (
481−82:37 tight name list
482−82:42 name tank
483−82:46 tight glyph )
484−82:47 tight glyph ]
482+82:23 tight glyph ]
485−84:1 DEDENT
48684:1 NEWLINE
48384:1 NEWLINE
48784:1 glyph +$
48484:1 glyph +$
488−84:4 name nail
485+84:4 name edge
48984:9 glyph [
48684:9 glyph [
49084:10 tight name p
48784:10 tight name p
49184:11 tight glyph =
48884:11 tight glyph =
49284:12 tight name hair
48984:12 tight name hair
49384:17 name q
49084:17 name q
49484:18 tight glyph =
49184:18 tight glyph =
495−84:19 tight name tape
492+84:19 tight glyph (
493+84:20 tight name unit
494+84:25 glyph [
495+84:26 tight name p
496+84:27 tight glyph =
497+84:28 tight glyph *
498+84:30 name q
499+84:31 tight glyph =
500+84:32 tight name nail
501+84:36 tight glyph ]
502+84:37 tight glyph )
496−84:23 tight glyph ]
503+84:38 tight glyph ]
49786:1 NEWLINE
50486:1 NEWLINE
49886:1 glyph +$
50586:1 glyph +$
499−86:4 name edge
506+86:4 name rule
500−86:9 glyph [
507+86:9 glyph $-(
501−86:10 tight name p
502−86:11 tight glyph =
503−86:12 tight name hair
508+86:12 tight name nail
504−86:17 name q
509+86:17 name edge
505−86:18 tight glyph =
506−86:19 tight glyph (
507−86:20 tight name unit
508−86:25 glyph [
509−86:26 tight name p
510−86:27 tight glyph =
511−86:28 tight glyph *
512−86:30 name q
513−86:31 tight glyph =
514−86:32 tight name nail
515−86:36 tight glyph ]
516−86:37 tight glyph )
510+86:21 tight glyph )
517−86:38 tight glyph ]
51888:1 NEWLINE
51188:1 NEWLINE
51988:1 glyph +$
51288:1 glyph +$
520−88:4 name rule
513+88:4 name spot
521−88:9 glyph $-(
514+88:9 glyph [
515+88:10 tight name p
516+88:11 tight glyph =
522−88:12 tight name nail
517+88:12 tight name path
523−88:17 name edge
518+88:17 name q
519+88:18 tight glyph =
520+88:19 tight name pint
524−88:21 tight glyph )
521+88:23 tight glyph ]
52590:1 NEWLINE
52290:1 NEWLINE
52690:1 glyph +$
52390:1 glyph +$
527−90:4 name spot
524+90:4 name toon
528−90:9 glyph [
525+91:3 INDENT
529−90:10 tight name p
526+91:3 glyph [
530−90:11 tight glyph =
527+91:4 tight lit %0
531−90:12 tight name path
528+91:7 name p
532−90:17 name q
529+91:8 tight glyph =
533−90:18 tight glyph =
530+91:9 tight glyph *
534−90:19 tight name pint
531+91:10 tight glyph ]
535−90:23 tight glyph ]
532+92:3 NEWLINE
536−92:1 NEWLINE
533+92:3 glyph [
537−92:1 glyph +$
534+92:4 tight lit %1
538−92:4 name toon
535+92:7 name p
539−93:3 INDENT
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 %0
541+93:4 tight lit %2
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 (
559−95:10 tight name list
545+93:10 tight name list
560−95:15 name tank
546+93:15 name tank
561−95:19 tight glyph )
547+93:19 tight glyph )
562−95:20 tight glyph ]
548+93:20 tight glyph ]
563−97:1 DEDENT
549+95:1 DEDENT
550+95:1 NEWLINE
551+95:1 glyph +$
552+95:4 name like
553+95:9 glyph |$
554+95:12 glyph [
555+95:13 tight tvar A
556+95:14 tight glyph ]
557+95:16 glyph [
558+95:17 tight name p
559+95:18 tight glyph =
560+95:19 tight name hair
561+95:24 name q
562+95:25 tight glyph =
563+95:26 tight glyph (
564+95:27 tight name unit
565+95:32 glyph [
566+95:33 tight name p
567+95:34 tight glyph =
568+95:35 tight tvar A
569+95:37 name q
570+95:38 tight glyph =
571+95:39 tight name nail
572+95:43 tight glyph ]
573+95:44 tight glyph )
574+95:45 tight glyph ]
56497:1 NEWLINE
57597:1 NEWLINE
565−97:1 glyph +$
576+97:1 glyph ++
566−97:4 name like
577+97:4 name wonk
567−97:9 glyph |$
568−97:12 glyph [
569−97:13 tight tvar A
570−97:14 tight glyph ]
571−97:16 glyph [
572−97:17 tight name p
573−97:18 tight glyph =
574−97:19 tight name hair
575−97:24 name q
576−97:25 tight glyph =
577−97:26 tight glyph (
578−97:27 tight name unit
579−97:32 glyph [
580−97:33 tight name p
581−97:34 tight glyph =
582−97:35 tight tvar A
583−97:37 name q
584−97:38 tight glyph =
585−97:39 tight name nail
586−97:43 tight glyph ]
587−97:44 tight glyph )
588−97:45 tight glyph ]
589−99:1 NEWLINE
590−99:1 glyph ++
591−99:4 name like
592−99:9 glyph |=
578+97:9 glyph |=
593−99:12 glyph [
579+97:12 name veq
594−99:13 tight name f
595−99:14 tight glyph =
580+97:15 tight glyph =
596−99:15 tight glyph $-(
581+97:16 tight glyph (
597−99:18 tight tvar A
582+97:17 tight name like
598−99:20 tvar B
583+97:22 tvar A
599−99:21 tight glyph )
600−99:23 name result
601−99:29 tight glyph =
584+97:23 tight glyph )
585+98:3 INDENT
602−99:30 tight glyph (
586+98:3 glyph ?-
603−99:31 tight name like
587+98:6 wing q.veq
604−99:36 tvar A
588+99:5 INDENT
605−99:37 tight glyph )
589+99:5 lit ~
606−99:38 tight glyph ]
590+99:7 glyph !!
607−100:3 INDENT
591+100:5 NEWLINE
608−100:3 glyph ++
592+100:5 glyph [
609−100:6 name mapped
593+100:6 tight lit ~
610−101:5 INDENT
594+100:8 name product
611−101:5 glyph ^-
595+100:15 tight glyph ]
612−101:8 glyph (
596+100:17 wing p.product
613−101:9 tight name unit
597+102:1 DEDENT
614−101:14 glyph [
598+102:1 DEDENT
615−101:15 tight name p
599+102:1 NEWLINE
616−101:16 tight glyph =
600+102:1 glyph +$
617−101:17 tight tvar B
601+102:4 name lone
618−101:19 name q
602+102:9 glyph |$
619−101:20 tight glyph =
603+102:12 glyph [
620−101:21 tight name nail
604+102:13 tight tvar A
621−101:25 tight glyph ]
605+102:14 tight glyph ]
622−101:26 tight glyph )
606+102:16 glyph [
623−102:7 INDENT
607+102:17 tight name p
624−102:7 glyph ?-
608+102:18 tight glyph =
625−102:10 wing q.result
609+102:19 tight tvar A
626−103:9 INDENT
610+102:20 tight glyph ]
627−103:9 lit ~
611+104:1 NEWLINE
628−103:11 lit ~
612+104:1 glyph +$
613+104:4 name lest
629−104:9 NEWLINE
614+104:9 glyph |$
630−104:9 glyph [
615+104:12 glyph [
631−104:10 tight lit ~
616+104:13 tight tvar A
632−104:12 name value
617+104:14 tight glyph ]
618+104:16 glyph [
633−104:17 tight glyph ]
619+104:17 tight name i
634−104:19 glyph `
620+104:18 tight glyph =
635−104:20 tight glyph [
621+104:19 tight tvar A
636−104:21 tight name p
622+104:21 name t
637104:22 tight glyph =
623104:22 tight glyph =
638104:23 tight glyph (
624104:23 tight glyph (
639−104:24 tight name f
625+104:24 tight name list
640−104:26 wing p.value
626+104:29 tvar A
641−104:33 tight glyph )
627+104:30 tight glyph )
642−104:35 name q
628+104:31 tight glyph ]
629+106:1 NEWLINE
630+106:1 glyph +$
631+106:4 name pole
632+106:9 glyph |$
643−104:36 tight glyph =
633+106:12 glyph [
644−104:37 tight wing q.value
634+106:13 tight tvar A
645−104:44 tight glyph ]
635+106:14 tight glyph ]
646−105:3 DEDENT
636+107:3 INDENT
647−105:3 DEDENT
637+107:3 lit ~
648−105:3 DEDENT
638+108:3 NEWLINE
649−105:3 NEWLINE
639+108:3 glyph [
650−105:3 glyph ^-
640+108:4 tight tvar A
651−105:6 glyph (
641+108:6 glyph (
652−105:7 tight name like
642+108:7 tight name pole
653−105:12 tvar B
643+108:12 tvar A
654−105:13 tight glyph )
644+108:13 tight glyph )
645+108:14 tight glyph ]
646+110:1 DEDENT
647+110:1 NEWLINE
648+110:1 glyph +$
649+110:4 name quip
650+110:9 glyph |$
655−105:15 glyph [
651+110:12 glyph [
656−105:16 tight name p
652+110:13 tight tvar A
653+110:15 tvar B
657−105:17 tight glyph =
654+110:16 tight glyph ]
658−105:18 tight wing p.result
655+110:18 glyph [
659−105:27 name q
656+110:19 tight glyph (
660−105:28 tight glyph =
657+110:20 tight name list
661−105:29 tight name mapped
658+110:25 tvar A
662−105:35 tight glyph ]
659+110:26 tight glyph )
663−107:1 DEDENT
664−107:1 NEWLINE
665−107:1 glyph ++
666−107:4 name wonk
667−107:9 glyph |=
668−107:12 name veq
669−107:15 tight glyph =
670−107:16 tight glyph (
671−107:17 tight name like
672−107:22 tvar A
660+110:28 tvar B
673−107:23 tight glyph )
674−108:3 INDENT
675−108:3 glyph ?-
676−108:6 wing q.veq
677−109:5 INDENT
678−109:5 lit ~
679−109:7 glyph !!
680−110:5 NEWLINE
681−110:5 glyph [
682−110:6 tight lit ~
683−110:8 name product
684−110:15 tight glyph ]
661+110:29 tight glyph ]
685−110:17 wing p.product
686−112:1 DEDENT
687−112:1 DEDENT
688112:1 NEWLINE
662112:1 NEWLINE
689112:1 glyph +$
663112:1 glyph +$
690−112:4 name lone
664+112:4 name tree
691112:9 glyph |$
665112:9 glyph |$
692112:12 glyph [
666112:12 glyph [
693112:13 tight tvar A
667112:13 tight tvar A
694112:14 tight glyph ]
668112:14 tight glyph ]
695−112:16 glyph [
669+113:3 INDENT
696−112:17 tight name p
670+113:3 lit ~
697−112:18 tight glyph =
698−112:19 tight tvar A
699−112:20 tight glyph ]
700−114:1 NEWLINE
671+114:3 NEWLINE
701−114:1 glyph +$
672+114:3 glyph [
702−114:4 name lest
673+114:4 tight name n
703−114:9 glyph |$
674+114:5 tight glyph =
675+114:6 tight tvar A
676+114:8 name l
704−114:12 glyph [
677+114:9 tight glyph =
705−114:13 tight tvar A
678+114:10 tight glyph (
706−114:14 tight glyph ]
679+114:11 tight name tree
707−114:16 glyph [
680+114:16 tvar A
708−114:17 tight name i
681+114:17 tight glyph )
709−114:18 tight glyph =
682+114:19 name r
710−114:19 tight tvar A
683+114:20 tight glyph =
711−114:21 name t
684+114:21 tight glyph (
712−114:22 tight glyph =
685+114:22 tight name tree
713−114:23 tight glyph (
686+114:27 tvar A
714−114:24 tight name list
687+114:28 tight glyph )
715−114:29 tvar A
716−114:30 tight glyph )
688+114:29 tight glyph ]
717−114:31 tight glyph ]
689+116:1 DEDENT
718116:1 NEWLINE
690116:1 NEWLINE
719116:1 glyph +$
691116:1 glyph +$
720−116:4 name pole
692+116:4 name each
721116:9 glyph |$
693116:9 glyph |$
722116:12 glyph [
694116:12 glyph [
723116:13 tight tvar A
695116:13 tight tvar A
696+116:15 tvar B
724−116:14 tight glyph ]
697+116:16 tight glyph ]
725117:3 INDENT
698117:3 INDENT
726−117:3 lit ~
699+117:3 glyph [
700+117:4 tight lit %|
701+117:7 name p
702+117:8 tight glyph =
703+117:9 tight tvar B
704+117:10 tight glyph ]
727118:3 NEWLINE
705118:3 NEWLINE
728118:3 glyph [
706118:3 glyph [
729−118:4 tight tvar A
707+118:4 tight lit %&
730−118:6 glyph (
731−118:7 tight name pole
708+118:7 name p
732−118:12 tvar A
709+118:8 tight glyph =
733−118:13 tight glyph )
710+118:9 tight tvar A
734−118:14 tight glyph ]
711+118:10 tight glyph ]
735120:1 DEDENT
712120:1 DEDENT
736120:1 NEWLINE
713120:1 NEWLINE
737120:1 glyph +$
714120:1 glyph +$
738−120:4 name quip
715+120:4 name bloq
739−120:9 glyph |$
740−120:12 glyph [
741−120:13 tight tvar A
742−120:15 tvar B
743−120:16 tight glyph ]
744−120:18 glyph [
745−120:19 tight glyph (
746−120:20 tight name list
747−120:25 tvar A
748−120:26 tight glyph )
749−120:28 tvar B
750−120:29 tight glyph ]
751−122:1 NEWLINE
752−122:1 glyph +$
753−122:4 name tree
754−122:9 glyph |$
755−122:12 glyph [
756−122:13 tight tvar A
757−122:14 tight glyph ]
758−123:3 INDENT
759−123:3 lit ~
760−124:3 NEWLINE
761−124:3 glyph [
762−124:4 tight name n
763−124:5 tight glyph =
764−124:6 tight tvar A
765−124:8 name l
766−124:9 tight glyph =
767−124:10 tight glyph (
768−124:11 tight name tree
769−124:16 tvar A
770−124:17 tight glyph )
771−124:19 name r
772−124:20 tight glyph =
773−124:21 tight glyph (
774−124:22 tight name tree
775−124:27 tvar A
776−124:28 tight glyph )
777−124:29 tight glyph ]
778−126:1 DEDENT
779−126:1 NEWLINE
780−126:1 glyph +$
781−126:4 name each
782−126:9 glyph |$
783−126:12 glyph [
784−126:13 tight tvar A
785−126:15 tvar B
786−126:16 tight glyph ]
787−127:3 INDENT
788−127:3 glyph [
789−127:4 tight lit %|
790−127:7 name p
791−127:8 tight glyph =
792−127:9 tight tvar B
793−127:10 tight glyph ]
794−128:3 NEWLINE
795−128:3 glyph [
796−128:4 tight lit %&
797−128:7 name p
798−128:8 tight glyph =
799−128:9 tight tvar A
800−128:10 tight glyph ]
801−130:1 DEDENT
802−130:1 NEWLINE
803−130:1 glyph +$
804−130:4 name bloq
805−130:9 aura @
716+120:9 aura @
806−130:10 NEWLINE
717+120:10 NEWLINE
tests/golden/prelude-1c-structural/tree.txt+185−223
@@ -87,236 +87,198 @@
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− (cast 40:7
90+ (branch 40:7
91− (apply 40:10 list (tvar 40:16 A))
91+ (wing 40:10 xs)
92− (body 41:9
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (branch 41:9
94− (wing 41:12 xs)
95− (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96− (arm 43:11
93+ (arm 42:9
97− (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
98− (tuple 43:23
95+ (tuple 42:21
99− (wing 43:24 item)
96+ (wing 42:22 item)
100− (group 43:29
97+ (group 42:27
101− (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
102− (value 45:1 turn
99+ (value 44:1 turn
103− (gate 45:9
100+ (gate 44:9
104− (face 45:12 args
101+ (face 44:12 args
105− (cell 45:17
102+ (cell 44:17
106− (apply 45:18 list (tvar 45:24 A))
103+ (apply 44:18 list (tvar 44:24 A))
107− (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
108− (body 46:3
105+ (body 45:3
109− (branch 46:3
106+ (branch 45:3
110− (wing 46:6 args)
107+ (wing 45:6 args)
111− (arm 47:5
108+ (arm 46:5
112− (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
113− (body 48:7
110+ (body 47:7
114− (cast 48:7
111+ (branch 47:7
115− (apply 48:10 list (tvar 48:16 B))
112+ (wing 47:10 xs)
116− (body 49:9
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
117− (branch 49:9
118− (wing 49:12 xs)
119− (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120− (arm 51:11
114+ (arm 49:9
121− (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
122− (tuple 51:23
116+ (tuple 49:21
123− (group 51:24
117+ (group 49:22
124− (call 51:25 (wing 51:25 f) (wing 51:27 item)))
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
125− (group 51:33
119+ (group 49:31
126− (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121+ (mold 51:1 dime
122+ (cell 51:9
123+ (face 51:10 p (aura 51:12 @ta))
124+ (face 51:16 q (aura 51:18 @))))
127− (mold 53:1 dime
125+ (mold 53:1 hair
128 (cell 53:9
126 (cell 53:9
129− (face 53:10 p (aura 53:12 @ta))
127+ (face 53:10 p (aura 53:12 @ud))
130− (face 53:16 q (aura 53:18 @))))
128+ (face 53:16 q (aura 53:18 @ud))))
131− (mold 55:1 hair
129+ (mold 55:1 pint
132 (cell 55:9
130 (cell 55:9
133− (face 55:10 p (aura 55:12 @ud))
131+ (face 55:10 p
134− (face 55:16 q (aura 55:18 @ud))))
135− (mold 57:1 pint
136− (cell 57:9
137− (face 57:10 p
138− (cell 57:12
132+ (cell 55:12
139− (face 57:13 p (aura 57:15 @))
133+ (face 55:13 p (aura 55:15 @))
140− (face 57:17 q (aura 57:19 @))))
134+ (face 55:17 q (aura 55:19 @))))
141− (face 57:22 q
135+ (face 55:22 q
142− (cell 57:24
136+ (cell 55:24
143− (face 57:25 p (aura 57:27 @))
137+ (face 55:25 p (aura 55:27 @))
144− (face 57:29 q (aura 57:31 @))))))
138+ (face 55:29 q (aura 55:31 @))))))
145− (mold 59:1 coin
139+ (mold 57:1 coin
146− (union 60:3
140+ (union 58:3
141+ (cell 58:3
142+ (const 58:4 %$)
143+ (face 58:7 p (ref 58:9 dime)))
144+ (cell 59:3
145+ (const 59:4 %blob)
146+ (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %$)
148+ (const 60:4 %many)
149− (face 60:7 p (ref 60:9 dime)))
150− (cell 61:3
151− (const 61:4 %blob)
152− (face 61:10 p (noun 61:12)))
153− (cell 62:3
154− (const 62:4 %many)
155− (face 62:10 p
149+ (face 60:10 p
156− (apply 62:12 list (ref 62:18 coin))))))
150+ (apply 60:12 list (ref 60:18 coin))))))
157− (mold 64:1 pair
151+ (mold 62:1 pair
158− (generic 64:9 A B
152+ (generic 62:9 A B
159− (cell 64:18
153+ (cell 62:18
160− (face 64:19 p (tvar 64:21 A))
154+ (face 62:19 p (tvar 62:21 A))
161− (face 64:23 q (tvar 64:25 B)))))
155+ (face 62:23 q (tvar 62:25 B)))))
162− (mold 66:1 trel
156+ (mold 64:1 trel
163− (generic 66:9 A B C
157+ (generic 64:9 A B C
164− (cell 66:20
158+ (cell 64:20
165− (face 66:21 p (tvar 66:23 A))
159+ (face 64:21 p (tvar 64:23 A))
166− (face 66:25 q (tvar 66:27 B))
160+ (face 64:25 q (tvar 64:27 B))
167− (face 66:29 r (tvar 66:31 C)))))
161+ (face 64:29 r (tvar 64:31 C)))))
168− (mold 68:1 qual
162+ (mold 66:1 qual
169− (generic 68:9 A B C D
163+ (generic 66:9 A B C D
170− (cell 68:22
164+ (cell 66:22
171− (face 68:23 p (tvar 68:25 A))
165+ (face 66:23 p (tvar 66:25 A))
172− (face 68:27 q (tvar 68:29 B))
166+ (face 66:27 q (tvar 66:29 B))
173− (face 68:31 r (tvar 68:33 C))
167+ (face 66:31 r (tvar 66:33 C))
174− (face 68:35 s (tvar 68:37 D)))))
168+ (face 66:35 s (tvar 66:37 D)))))
175− (mold 70:1 cord (aura 70:9 @t))
169+ (mold 68:1 cord (aura 68:9 @t))
176− (mold 72:1 knot (aura 72:9 @ta))
170+ (mold 70:1 knot (aura 70:9 @ta))
177− (mold 74:1 tape
171+ (mold 72:1 tape
178− (apply 74:9 list (aura 74:15 @tD)))
172+ (apply 72:9 list (aura 72:15 @tD)))
179− (mold 76:1 path
173+ (mold 74:1 path
180− (apply 76:9 list (ref 76:15 knot)))
174+ (apply 74:9 list (ref 74:15 knot)))
181− (mold 78:1 tank
175+ (mold 76:1 tank
182− (union 79:3
176+ (union 77:3
183− (ref 79:3 cord)
177+ (ref 77:3 cord)
178+ (cell 78:3
179+ (const 78:4 %leaf)
180+ (face 78:10 p (ref 78:12 tape)))
181+ (cell 79:3
182+ (const 79:4 %palm)
183+ (face 79:10 p
184+ (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185+ (face 79:39 q
186+ (apply 79:41 list (ref 79:47 tank))))
184 (cell 80:3
187 (cell 80:3
185− (const 80:4 %leaf)
188+ (const 80:4 %rose)
186− (face 80:10 p (ref 80:12 tape)))
187− (cell 81:3
188− (const 81:4 %palm)
189− (face 81:10 p
190− (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191− (face 81:39 q
192− (apply 81:41 list (ref 81:47 tank))))
193− (cell 82:3
194− (const 82:4 %rose)
195− (face 82:10 p
189+ (face 80:10 p
196− (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
190+ (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
197− (face 82:34 q
191+ (face 80:34 q
198− (apply 82:36 list (ref 82:42 tank))))))
192+ (apply 80:36 list (ref 80:42 tank))))))
199− (mold 84:1 nail
193+ (mold 82:1 nail
194+ (cell 82:9
195+ (face 82:10 p (ref 82:12 hair))
196+ (face 82:17 q (ref 82:19 tape))))
197+ (mold 84:1 edge
200 (cell 84:9
198 (cell 84:9
201 (face 84:10 p (ref 84:12 hair))
199 (face 84:10 p (ref 84:12 hair))
202− (face 84:17 q (ref 84:19 tape))))
200+ (face 84:17 q
203− (mold 86:1 edge
204− (cell 86:9
205− (face 86:10 p (ref 86:12 hair))
206− (face 86:17 q
207− (apply 86:19 unit
201+ (apply 84:19 unit
208− (cell 86:25
202+ (cell 84:25
209− (face 86:26 p (noun 86:28))
203+ (face 84:26 p (noun 84:28))
210− (face 86:30 q (ref 86:32 nail)))))))
204+ (face 84:30 q (ref 84:32 nail)))))))
211− (mold 88:1 rule
205+ (mold 86:1 rule
212− (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
206+ (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
213− (mold 90:1 spot
207+ (mold 88:1 spot
214− (cell 90:9
208+ (cell 88:9
215− (face 90:10 p (ref 90:12 path))
209+ (face 88:10 p (ref 88:12 path))
216− (face 90:17 q (ref 90:19 pint))))
210+ (face 88:17 q (ref 88:19 pint))))
217− (mold 92:1 toon
211+ (mold 90:1 toon
218− (union 93:3
212+ (union 91:3
213+ (cell 91:3
214+ (const 91:4 %0)
215+ (face 91:7 p (noun 91:9)))
216+ (cell 92:3
217+ (const 92:4 %1)
218+ (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %0)
220+ (const 93:4 %2)
221− (face 93:7 p (noun 93:9)))
222− (cell 94:3
223− (const 94:4 %1)
224− (face 94:7 p (noun 94:9)))
225− (cell 95:3
226− (const 95:4 %2)
227− (face 95:7 p
221+ (face 93:7 p
228− (apply 95:9 list (ref 95:15 tank))))))
222+ (apply 93:9 list (ref 93:15 tank))))))
229− (mold 97:1 like
223+ (mold 95:1 like
230− (generic 97:9 A
224+ (generic 95:9 A
231− (cell 97:16
225+ (cell 95:16
232− (face 97:17 p (ref 97:19 hair))
226+ (face 95:17 p (ref 95:19 hair))
233− (face 97:24 q
227+ (face 95:24 q
234− (apply 97:26 unit
228+ (apply 95:26 unit
235− (cell 97:32
229+ (cell 95:32
236− (face 97:33 p (tvar 97:35 A))
230+ (face 95:33 p (tvar 95:35 A))
237− (face 97:37 q (ref 97:39 nail))))))))
231+ (face 95:37 q (ref 95:39 nail))))))))
238− (value 99:1 like
232+ (value 97:1 wonk
239− (gate 99:9
240− (cell 99:12
241− (face 99:13 f
242− (fn 99:15 (tvar 99:18 A) (tvar 99:20 B)))
243− (face 99:23 result
244− (apply 99:30 like (tvar 99:36 A))))
245− (body 100:3
246− (value 100:3 mapped
247− (body 101:5
248− (cast 101:5
249− (apply 101:8 unit
250− (cell 101:14
251− (face 101:15 p (tvar 101:17 B))
252− (face 101:19 q (ref 101:21 nail))))
253− (body 102:7
254− (branch 102:7
255− (wing 102:10 q.result)
256− (arm 103:9 (lit 103:9 ~) (lit 103:11 ~))
257− (arm 104:9
258− (cell 104:9 (lit 104:10 ~) (bind 104:12 value))
259− (unit 104:19
260− (tuple 104:20
261− (face 104:21 p
262− (group 104:23
263− (call 104:24 (wing 104:24 f) (wing 104:26 p.value))))
264− (face 104:35 q (wing 104:37 q.value))))))))))
265− (cast 105:3
266− (apply 105:6 like (tvar 105:12 B))
267− (tuple 105:15
268− (face 105:16 p (wing 105:18 p.result))
269− (face 105:27 q (wing 105:29 mapped)))))))
270− (value 107:1 wonk
271− (gate 107:9
233+ (gate 97:9
272− (face 107:12 veq
234+ (face 97:12 veq
273− (apply 107:16 like (tvar 107:22 A)))
235+ (apply 97:16 like (tvar 97:22 A)))
274− (body 108:3
236+ (body 98:3
275− (branch 108:3
237+ (branch 98:3
276− (wing 108:6 q.veq)
238+ (wing 98:6 q.veq)
277− (arm 109:5 (lit 109:5 ~) (crash 109:7))
239+ (arm 99:5 (lit 99:5 ~) (crash 99:7))
278− (arm 110:5
240+ (arm 100:5
279− (cell 110:5 (lit 110:6 ~) (bind 110:8 product))
241+ (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
280− (wing 110:17 p.product))))))
242+ (wing 100:17 p.product))))))
281− (mold 112:1 lone
243+ (mold 102:1 lone
244+ (generic 102:9 A
245+ (cell 102:16
246+ (face 102:17 p (tvar 102:19 A)))))
247+ (mold 104:1 lest
248+ (generic 104:9 A
249+ (cell 104:16
250+ (face 104:17 i (tvar 104:19 A))
251+ (face 104:21 t
252+ (apply 104:23 list (tvar 104:29 A))))))
253+ (mold 106:1 pole
254+ (generic 106:9 A
255+ (union 107:3
256+ (const 107:3 ~)
257+ (cell 108:3
258+ (tvar 108:4 A)
259+ (apply 108:6 pole (tvar 108:12 A))))))
260+ (mold 110:1 quip
261+ (generic 110:9 A B
262+ (cell 110:18
263+ (apply 110:19 list (tvar 110:25 A))
264+ (tvar 110:28 B))))
265+ (mold 112:1 tree
282 (generic 112:9 A
266 (generic 112:9 A
283− (cell 112:16
267+ (union 113:3
284− (face 112:17 p (tvar 112:19 A)))))
268+ (const 113:3 ~)
285− (mold 114:1 lest
269+ (cell 114:3
286− (generic 114:9 A
270+ (face 114:4 n (tvar 114:6 A))
287− (cell 114:16
271+ (face 114:8 l
288− (face 114:17 i (tvar 114:19 A))
272+ (apply 114:10 tree (tvar 114:16 A)))
289− (face 114:21 t
273+ (face 114:19 r
290− (apply 114:23 list (tvar 114:29 A))))))
274+ (apply 114:21 tree (tvar 114:27 A)))))))
291− (mold 116:1 pole
275+ (mold 116:1 each
292− (generic 116:9 A
276+ (generic 116:9 A B
293 (union 117:3
277 (union 117:3
278+ (cell 117:3
294− (const 117:3 ~)
279+ (const 117:4 %|)
280+ (face 117:7 p (tvar 117:9 B)))
295 (cell 118:3
281 (cell 118:3
296− (tvar 118:4 A)
297− (apply 118:6 pole (tvar 118:12 A))))))
298− (mold 120:1 quip
299− (generic 120:9 A B
300− (cell 120:18
301− (apply 120:19 list (tvar 120:25 A))
302− (tvar 120:28 B))))
303− (mold 122:1 tree
304− (generic 122:9 A
305− (union 123:3
306− (const 123:3 ~)
282+ (const 118:4 %&)
307− (cell 124:3
308− (face 124:4 n (tvar 124:6 A))
309− (face 124:8 l
310− (apply 124:10 tree (tvar 124:16 A)))
311− (face 124:19 r
312− (apply 124:21 tree (tvar 124:27 A)))))))
313− (mold 126:1 each
314− (generic 126:9 A B
315− (union 127:3
316− (cell 127:3
317− (const 127:4 %|)
318− (face 127:7 p (tvar 127:9 B)))
319− (cell 128:3
320− (const 128:4 %&)
321− (face 128:7 p (tvar 128:9 A))))))
283+ (face 118:7 p (tvar 118:9 A))))))
322− (mold 130:1 bloq (aura 130:9 @)))
284+ (mold 120:1 bloq (aura 120:9 @)))
tests/golden/prelude-1c-structural/types.txt−1
@@ -27,7 +27,6 @@ partial inference; module not checked
27+$ spot: not checked
27+$ spot: not checked
28+$ toon: cases proven disjoint; mold not checked
28+$ toon: cases proven disjoint; mold not checked
29+$ like: not checked
29+$ like: not checked
30−++ like: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
30++ wonk: sample mold is not supported by partial inference
32+$ lone: not checked
31+$ lone: not checked
33+$ lest: not checked
32+$ lest: not checked
tests/golden/prelude-3g-basic/source.jibb+6−8
@@ -37,18 +37,16 @@
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)
41− ?- xs
40+ ?- xs
42− ~ ys
41+ ~ ys
43− [item rest] [item (weld rest ys)]
42+ [item rest] [item (weld rest ys)]
44
43
45++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
46 ?- args
45 ?- args
47 [xs f]
46 [xs f]
48− ^- (list B)
49− ?- xs
47+ ?- xs
50− ~ ~
48+ ~ ~
51− [item rest] [(f item) (turn rest f)]
49+ [item rest] [(f item) (turn rest f)]
52
50
53+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
54
52
tests/golden/prelude-3g-basic/tokens.txt+132−146
@@ -190,165 +190,151 @@
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 glyph (
194+40:10 name xs
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
19841:9 INDENT
19541:9 INDENT
199−41:9 glyph ?-
200−41:12 name xs
201−42:11 INDENT
202−42:11 lit ~
196+41:9 lit ~
203−42:13 name ys
197+41:11 name ys
204−43:11 NEWLINE
198+42:9 NEWLINE
205−43:11 glyph [
199+42:9 glyph [
206−43:12 tight name item
200+42:10 tight name item
207−43:17 name rest
201+42:15 name rest
208−43:21 tight glyph ]
202+42:19 tight glyph ]
209−43:23 glyph [
203+42:21 glyph [
210−43:24 tight name item
204+42:22 tight name item
211−43:29 glyph (
205+42:27 glyph (
212−43:30 tight name weld
206+42:28 tight name weld
213−43:35 name rest
207+42:33 name rest
214−43:40 name ys
208+42:38 name ys
215−43:42 tight glyph )
209+42:40 tight glyph )
216−43:43 tight glyph ]
210+42:41 tight glyph ]
217−45:1 DEDENT
211+44:1 DEDENT
218−45:1 DEDENT
219−45:1 DEDENT
212+44:1 DEDENT
220−45:1 DEDENT
213+44:1 DEDENT
221−45:1 DEDENT
214+44:1 DEDENT
222−45:1 NEWLINE
215+44:1 NEWLINE
223−45:1 glyph ++
216+44:1 glyph ++
224−45:4 name turn
217+44:4 name turn
225−45:9 glyph |=
218+44:9 glyph |=
226−45:12 name args
219+44:12 name args
227−45:16 tight glyph =
220+44:16 tight glyph =
228−45:17 tight glyph [
221+44:17 tight glyph [
229−45:18 tight glyph (
222+44:18 tight glyph (
230−45:19 tight name list
223+44:19 tight name list
231−45:24 tvar A
224+44:24 tvar A
232−45:25 tight glyph )
225+44:25 tight glyph )
233−45:27 glyph $-(
226+44:27 glyph $-(
234−45:30 tight tvar A
227+44:30 tight tvar A
235−45:32 tvar B
228+44:32 tvar B
236−45:33 tight glyph )
229+44:33 tight glyph )
237−45:34 tight glyph ]
230+44:34 tight glyph ]
238−46:3 INDENT
231+45:3 INDENT
239−46:3 glyph ?-
232+45:3 glyph ?-
240−46:6 name args
233+45:6 name args
241−47:5 INDENT
234+46:5 INDENT
242−47:5 glyph [
235+46:5 glyph [
243−47:6 tight name xs
236+46:6 tight name xs
244−47:9 name f
237+46:9 name f
245−47:10 tight glyph ]
238+46:10 tight glyph ]
246−48:7 INDENT
239+47:7 INDENT
247−48:7 glyph ^-
240+47:7 glyph ?-
248−48:10 glyph (
241+47:10 name xs
249−48:11 tight name list
250−48:16 tvar B
251−48:17 tight glyph )
252−49:9 INDENT
242+48:9 INDENT
253−49:9 glyph ?-
254−49:12 name xs
255−50:11 INDENT
256−50:11 lit ~
243+48:9 lit ~
257−50:13 lit ~
244+48:11 lit ~
258−51:11 NEWLINE
245+49:9 NEWLINE
259−51:11 glyph [
246+49:9 glyph [
260−51:12 tight name item
247+49:10 tight name item
261−51:17 name rest
248+49:15 name rest
262−51:21 tight glyph ]
249+49:19 tight glyph ]
263−51:23 glyph [
250+49:21 glyph [
264−51:24 tight glyph (
251+49:22 tight glyph (
265−51:25 tight name f
252+49:23 tight name f
266−51:27 name item
253+49:25 name item
254+49:29 tight glyph )
267−51:31 tight glyph )
255+49:31 glyph (
268−51:33 glyph (
269−51:34 tight name turn
256+49:32 tight name turn
270−51:39 name rest
257+49:37 name rest
271−51:44 name f
258+49:42 name f
272−51:45 tight glyph )
259+49:43 tight glyph )
273−51:46 tight glyph ]
260+49:44 tight glyph ]
274−53:1 DEDENT
261+51:1 DEDENT
275−53:1 DEDENT
262+51:1 DEDENT
276−53:1 DEDENT
263+51:1 DEDENT
277−53:1 DEDENT
264+51:1 DEDENT
278−53:1 DEDENT
265+51:1 NEWLINE
266+51:1 glyph +$
267+51:4 name dime
268+51:9 glyph [
269+51:10 tight name p
270+51:11 tight glyph =
271+51:12 tight aura @ta
272+51:16 name q
273+51:17 tight glyph =
274+51:18 tight aura @
275+51:19 tight glyph ]
27953:1 NEWLINE
27653:1 NEWLINE
28053:1 glyph +$
27753:1 glyph +$
281−53:4 name dime
278+53:4 name hair
28253:9 glyph [
27953:9 glyph [
28353:10 tight name p
28053:10 tight name p
28453:11 tight glyph =
28153:11 tight glyph =
285−53:12 tight aura @ta
282+53:12 tight aura @ud
28653:16 name q
28353:16 name q
28753:17 tight glyph =
28453:17 tight glyph =
288−53:18 tight aura @
285+53:18 tight aura @ud
289−53:19 tight glyph ]
286+53:21 tight glyph ]
29055:1 NEWLINE
28755:1 NEWLINE
29155:1 glyph +$
28855:1 glyph +$
292−55:4 name hair
289+55:4 name pint
29355:9 glyph [
29055:9 glyph [
29455:10 tight name p
29155:10 tight name p
29555:11 tight glyph =
29255:11 tight glyph =
296−55:12 tight aura @ud
293+55:12 tight glyph [
297−55:16 name q
294+55:13 tight name p
298−55:17 tight glyph =
295+55:14 tight glyph =
296+55:15 tight aura @
297+55:17 name q
299−55:18 tight aura @ud
298+55:18 tight glyph =
299+55:19 tight aura @
300+55:20 tight glyph ]
301+55:22 name q
302+55:23 tight glyph =
303+55:24 tight glyph [
304+55:25 tight name p
305+55:26 tight glyph =
306+55:27 tight aura @
307+55:29 name q
308+55:30 tight glyph =
309+55:31 tight aura @
310+55:32 tight glyph ]
300−55:21 tight glyph ]
311+55:33 tight glyph ]
30157:1 NEWLINE
31257:1 NEWLINE
30257:1 glyph +$
31357:1 glyph +$
303−57:4 name pint
314+57:4 name coin
315+58:3 INDENT
316+58:3 glyph [
317+58:4 tight lit %$
318+58:7 name p
319+58:8 tight glyph =
320+58:9 tight name dime
304−57:9 glyph [
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
305−57:10 tight name p
325+59:10 name p
306−57:11 tight glyph =
326+59:11 tight glyph =
307−57:12 tight glyph [
327+59:12 tight glyph *
308−57:13 tight name p
328+59:13 tight glyph ]
309−57:14 tight glyph =
329+60:3 NEWLINE
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 %$
331+60:4 tight lit %many
332−60:7 name p
333−60:8 tight glyph =
334−60:9 tight name dime
335−60:13 tight glyph ]
336−61:3 NEWLINE
337−61:3 glyph [
338−61:4 tight lit %blob
339−61:10 name p
340−61:11 tight glyph =
341−61:12 tight glyph *
342−61:13 tight glyph ]
343−62:3 NEWLINE
344−62:3 glyph [
345−62:4 tight lit %many
346−62:10 name p
332+60:10 name p
347−62:11 tight glyph =
333+60:11 tight glyph =
348−62:12 tight glyph (
334+60:12 tight glyph (
349−62:13 tight name list
335+60:13 tight name list
350−62:18 name coin
336+60:18 name coin
351−62:22 tight glyph )
337+60:22 tight glyph )
352−62:23 tight glyph ]
338+60:23 tight glyph ]
353−62:24 DEDENT
339+60:24 DEDENT
354−62:24 NEWLINE
340+60:24 NEWLINE
tests/golden/prelude-3g-basic/tree.txt+58−64
@@ -87,70 +87,64 @@
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− (cast 40:7
90+ (branch 40:7
91− (apply 40:10 list (tvar 40:16 A))
91+ (wing 40:10 xs)
92− (body 41:9
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (branch 41:9
94− (wing 41:12 xs)
95− (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96− (arm 43:11
93+ (arm 42:9
97− (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
98− (tuple 43:23
95+ (tuple 42:21
99− (wing 43:24 item)
96+ (wing 42:22 item)
100− (group 43:29
97+ (group 42:27
101− (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
102− (value 45:1 turn
99+ (value 44:1 turn
103− (gate 45:9
100+ (gate 44:9
104− (face 45:12 args
101+ (face 44:12 args
105− (cell 45:17
102+ (cell 44:17
106− (apply 45:18 list (tvar 45:24 A))
103+ (apply 44:18 list (tvar 44:24 A))
107− (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
108− (body 46:3
105+ (body 45:3
109− (branch 46:3
106+ (branch 45:3
110− (wing 46:6 args)
107+ (wing 45:6 args)
111− (arm 47:5
108+ (arm 46:5
112− (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
113− (body 48:7
110+ (body 47:7
114− (cast 48:7
111+ (branch 47:7
115− (apply 48:10 list (tvar 48:16 B))
112+ (wing 47:10 xs)
116− (body 49:9
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
117− (branch 49:9
118− (wing 49:12 xs)
119− (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120− (arm 51:11
114+ (arm 49:9
121− (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
122− (tuple 51:23
116+ (tuple 49:21
123− (group 51:24
117+ (group 49:22
124− (call 51:25 (wing 51:25 f) (wing 51:27 item)))
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
125− (group 51:33
119+ (group 49:31
126− (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121+ (mold 51:1 dime
122+ (cell 51:9
123+ (face 51:10 p (aura 51:12 @ta))
124+ (face 51:16 q (aura 51:18 @))))
127− (mold 53:1 dime
125+ (mold 53:1 hair
128 (cell 53:9
126 (cell 53:9
129− (face 53:10 p (aura 53:12 @ta))
127+ (face 53:10 p (aura 53:12 @ud))
130− (face 53:16 q (aura 53:18 @))))
128+ (face 53:16 q (aura 53:18 @ud))))
131− (mold 55:1 hair
129+ (mold 55:1 pint
132 (cell 55:9
130 (cell 55:9
133− (face 55:10 p (aura 55:12 @ud))
131+ (face 55:10 p
134− (face 55:16 q (aura 55:18 @ud))))
135− (mold 57:1 pint
136− (cell 57:9
137− (face 57:10 p
138− (cell 57:12
132+ (cell 55:12
139− (face 57:13 p (aura 57:15 @))
133+ (face 55:13 p (aura 55:15 @))
140− (face 57:17 q (aura 57:19 @))))
134+ (face 55:17 q (aura 55:19 @))))
141− (face 57:22 q
135+ (face 55:22 q
142− (cell 57:24
136+ (cell 55:24
143− (face 57:25 p (aura 57:27 @))
137+ (face 55:25 p (aura 55:27 @))
144− (face 57:29 q (aura 57:31 @))))))
138+ (face 55:29 q (aura 55:31 @))))))
145− (mold 59:1 coin
139+ (mold 57:1 coin
146− (union 60:3
140+ (union 58:3
141+ (cell 58:3
142+ (const 58:4 %$)
143+ (face 58:7 p (ref 58:9 dime)))
144+ (cell 59:3
145+ (const 59:4 %blob)
146+ (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %$)
148+ (const 60:4 %many)
149− (face 60:7 p (ref 60:9 dime)))
150− (cell 61:3
151− (const 61:4 %blob)
152− (face 61:10 p (noun 61:12)))
153− (cell 62:3
154− (const 62:4 %many)
155− (face 62:10 p
149+ (face 60:10 p
156− (apply 62:12 list (ref 62:18 coin)))))))
150+ (apply 60:12 list (ref 60:18 coin)))))))
tests/golden/prelude-3g-like/about.txt+3−3
@@ -1,4 +1,4 @@
1−source: Overview, Prelude: Hoon 3g includes `like` and `wonk`; the value `like` maps an existing result.
1+source: Overview, Prelude: "The exported inventory includes all names from the Hoon library sections listed below, excluding the groups explicitly left out"; Hoon 3g includes `like` and `wonk`.
2−tests: The source includes the generic `like` mold, its mapping gate and `wonk`.
2+tests: The prelude's `like` generic edge mold and `wonk` extractor; the callable value form of `like` is a separate, unresolved question. The source contains the prelude definitions through `like` and `wonk`.
3expect: parses
3expect: parses
4−expect-types: a partial inference report, not a checked module
4+expect-types: a partial inference report, not a checked module; generic molds and the `wonk` body are not fully checked yet
tests/golden/prelude-3g-like/source.jibb+6−16
@@ -37,18 +37,16 @@
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)
41− ?- xs
40+ ?- xs
42− ~ ys
41+ ~ ys
43− [item rest] [item (weld rest ys)]
42+ [item rest] [item (weld rest ys)]
44
43
45++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
46 ?- args
45 ?- args
47 [xs f]
46 [xs f]
48− ^- (list B)
49− ?- xs
47+ ?- xs
50− ~ ~
48+ ~ ~
51− [item rest] [(f item) (turn rest f)]
49+ [item rest] [(f item) (turn rest f)]
52
50
53+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
54
52
@@ -96,14 +94,6 @@
96
94
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
95+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
98
96
99−++ like |= [f=$-(A B) result=(like A)]
100− ++ mapped
101− ^- (unit [p=B q=nail])
102− ?- q.result
103− ~ ~
104− [~ value] `[p=(f p.value) q=q.value]
105− ^- (like B) [p=p.result q=mapped]
106−
107++ wonk |= veq=(like A)
97++ wonk |= veq=(like A)
108 ?- q.veq
98 ?- q.veq
109 ~ !!
99 ~ !!
tests/golden/prelude-3g-like/tokens.txt+343−432
@@ -190,499 +190,410 @@
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 glyph (
194+40:10 name xs
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
19841:9 INDENT
19541:9 INDENT
199−41:9 glyph ?-
200−41:12 name xs
201−42:11 INDENT
202−42:11 lit ~
196+41:9 lit ~
203−42:13 name ys
197+41:11 name ys
204−43:11 NEWLINE
198+42:9 NEWLINE
205−43:11 glyph [
199+42:9 glyph [
206−43:12 tight name item
200+42:10 tight name item
207−43:17 name rest
201+42:15 name rest
208−43:21 tight glyph ]
202+42:19 tight glyph ]
209−43:23 glyph [
203+42:21 glyph [
210−43:24 tight name item
204+42:22 tight name item
211−43:29 glyph (
205+42:27 glyph (
212−43:30 tight name weld
206+42:28 tight name weld
213−43:35 name rest
207+42:33 name rest
214−43:40 name ys
208+42:38 name ys
215−43:42 tight glyph )
209+42:40 tight glyph )
216−43:43 tight glyph ]
210+42:41 tight glyph ]
217−45:1 DEDENT
211+44:1 DEDENT
218−45:1 DEDENT
219−45:1 DEDENT
212+44:1 DEDENT
220−45:1 DEDENT
213+44:1 DEDENT
221−45:1 DEDENT
214+44:1 DEDENT
222−45:1 NEWLINE
215+44:1 NEWLINE
223−45:1 glyph ++
216+44:1 glyph ++
224−45:4 name turn
217+44:4 name turn
225−45:9 glyph |=
218+44:9 glyph |=
226−45:12 name args
219+44:12 name args
227−45:16 tight glyph =
220+44:16 tight glyph =
228−45:17 tight glyph [
221+44:17 tight glyph [
229−45:18 tight glyph (
222+44:18 tight glyph (
230−45:19 tight name list
223+44:19 tight name list
231−45:24 tvar A
224+44:24 tvar A
232−45:25 tight glyph )
225+44:25 tight glyph )
233−45:27 glyph $-(
226+44:27 glyph $-(
234−45:30 tight tvar A
227+44:30 tight tvar A
235−45:32 tvar B
228+44:32 tvar B
236−45:33 tight glyph )
229+44:33 tight glyph )
237−45:34 tight glyph ]
230+44:34 tight glyph ]
238−46:3 INDENT
231+45:3 INDENT
239−46:3 glyph ?-
232+45:3 glyph ?-
240−46:6 name args
233+45:6 name args
241−47:5 INDENT
234+46:5 INDENT
242−47:5 glyph [
235+46:5 glyph [
243−47:6 tight name xs
236+46:6 tight name xs
244−47:9 name f
237+46:9 name f
245−47:10 tight glyph ]
238+46:10 tight glyph ]
246−48:7 INDENT
239+47:7 INDENT
247−48:7 glyph ^-
240+47:7 glyph ?-
248−48:10 glyph (
241+47:10 name xs
249−48:11 tight name list
250−48:16 tvar B
251−48:17 tight glyph )
252−49:9 INDENT
242+48:9 INDENT
253−49:9 glyph ?-
254−49:12 name xs
255−50:11 INDENT
256−50:11 lit ~
243+48:9 lit ~
257−50:13 lit ~
244+48:11 lit ~
258−51:11 NEWLINE
245+49:9 NEWLINE
259−51:11 glyph [
246+49:9 glyph [
260−51:12 tight name item
247+49:10 tight name item
261−51:17 name rest
248+49:15 name rest
262−51:21 tight glyph ]
249+49:19 tight glyph ]
263−51:23 glyph [
250+49:21 glyph [
264−51:24 tight glyph (
251+49:22 tight glyph (
265−51:25 tight name f
252+49:23 tight name f
266−51:27 name item
253+49:25 name item
254+49:29 tight glyph )
267−51:31 tight glyph )
255+49:31 glyph (
268−51:33 glyph (
269−51:34 tight name turn
256+49:32 tight name turn
270−51:39 name rest
257+49:37 name rest
271−51:44 name f
258+49:42 name f
272−51:45 tight glyph )
259+49:43 tight glyph )
273−51:46 tight glyph ]
260+49:44 tight glyph ]
274−53:1 DEDENT
261+51:1 DEDENT
275−53:1 DEDENT
262+51:1 DEDENT
276−53:1 DEDENT
263+51:1 DEDENT
277−53:1 DEDENT
264+51:1 DEDENT
278−53:1 DEDENT
265+51:1 NEWLINE
266+51:1 glyph +$
267+51:4 name dime
268+51:9 glyph [
269+51:10 tight name p
270+51:11 tight glyph =
271+51:12 tight aura @ta
272+51:16 name q
273+51:17 tight glyph =
274+51:18 tight aura @
275+51:19 tight glyph ]
27953:1 NEWLINE
27653:1 NEWLINE
28053:1 glyph +$
27753:1 glyph +$
281−53:4 name dime
278+53:4 name hair
28253:9 glyph [
27953:9 glyph [
28353:10 tight name p
28053:10 tight name p
28453:11 tight glyph =
28153:11 tight glyph =
285−53:12 tight aura @ta
282+53:12 tight aura @ud
28653:16 name q
28353:16 name q
28753:17 tight glyph =
28453:17 tight glyph =
288−53:18 tight aura @
285+53:18 tight aura @ud
289−53:19 tight glyph ]
286+53:21 tight glyph ]
29055:1 NEWLINE
28755:1 NEWLINE
29155:1 glyph +$
28855:1 glyph +$
292−55:4 name hair
289+55:4 name pint
29355:9 glyph [
29055:9 glyph [
29455:10 tight name p
29155:10 tight name p
29555:11 tight glyph =
29255:11 tight glyph =
296−55:12 tight aura @ud
293+55:12 tight glyph [
297−55:16 name q
294+55:13 tight name p
298−55:17 tight glyph =
295+55:14 tight glyph =
296+55:15 tight aura @
297+55:17 name q
299−55:18 tight aura @ud
298+55:18 tight glyph =
299+55:19 tight aura @
300+55:20 tight glyph ]
301+55:22 name q
302+55:23 tight glyph =
303+55:24 tight glyph [
304+55:25 tight name p
305+55:26 tight glyph =
306+55:27 tight aura @
307+55:29 name q
308+55:30 tight glyph =
309+55:31 tight aura @
310+55:32 tight glyph ]
300−55:21 tight glyph ]
311+55:33 tight glyph ]
30157:1 NEWLINE
31257:1 NEWLINE
30257:1 glyph +$
31357:1 glyph +$
303−57:4 name pint
314+57:4 name coin
315+58:3 INDENT
316+58:3 glyph [
317+58:4 tight lit %$
318+58:7 name p
319+58:8 tight glyph =
320+58:9 tight name dime
304−57:9 glyph [
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
305−57:10 tight name p
325+59:10 name p
306−57:11 tight glyph =
326+59:11 tight glyph =
307−57:12 tight glyph [
327+59:12 tight glyph *
308−57:13 tight name p
328+59:13 tight glyph ]
309−57:14 tight glyph =
329+60:3 NEWLINE
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 %$
331+60:4 tight lit %many
332−60:7 name p
333−60:8 tight glyph =
334−60:9 tight name dime
335−60:13 tight glyph ]
336−61:3 NEWLINE
337−61:3 glyph [
338−61:4 tight lit %blob
339−61:10 name p
340−61:11 tight glyph =
341−61:12 tight glyph *
342−61:13 tight glyph ]
343−62:3 NEWLINE
344−62:3 glyph [
345−62:4 tight lit %many
346−62:10 name p
332+60:10 name p
347−62:11 tight glyph =
333+60:11 tight glyph =
348−62:12 tight glyph (
334+60:12 tight glyph (
349−62:13 tight name list
335+60:13 tight name list
350−62:18 name coin
336+60:18 name coin
351−62:22 tight glyph )
337+60:22 tight glyph )
352−62:23 tight glyph ]
338+60:23 tight glyph ]
353−64:1 DEDENT
339+62:1 DEDENT
340+62:1 NEWLINE
341+62:1 glyph +$
342+62:4 name pair
343+62:9 glyph |$
344+62:12 glyph [
345+62:13 tight tvar A
346+62:15 tvar B
347+62:16 tight glyph ]
348+62:18 glyph [
349+62:19 tight name p
350+62:20 tight glyph =
351+62:21 tight tvar A
352+62:23 name q
353+62:24 tight glyph =
354+62:25 tight tvar B
355+62:26 tight glyph ]
35464:1 NEWLINE
35664:1 NEWLINE
35564:1 glyph +$
35764:1 glyph +$
356−64:4 name pair
358+64:4 name trel
35764:9 glyph |$
35964:9 glyph |$
35864:12 glyph [
36064:12 glyph [
35964:13 tight tvar A
36164:13 tight tvar A
36064:15 tvar B
36264:15 tvar B
361−64:16 tight glyph ]
363+64:17 tvar C
364+64:18 tight glyph ]
362−64:18 glyph [
365+64:20 glyph [
363−64:19 tight name p
364−64:20 tight glyph =
365−64:21 tight tvar A
366+64:21 tight name p
366−64:23 name q
367+64:22 tight glyph =
367−64:24 tight glyph =
368+64:23 tight tvar A
369+64:25 name q
370+64:26 tight glyph =
368−64:25 tight tvar B
371+64:27 tight tvar B
372+64:29 name r
373+64:30 tight glyph =
374+64:31 tight tvar C
369−64:26 tight glyph ]
375+64:32 tight glyph ]
37066:1 NEWLINE
37666:1 NEWLINE
37166:1 glyph +$
37766:1 glyph +$
372−66:4 name trel
378+66:4 name qual
37366:9 glyph |$
37966:9 glyph |$
37466:12 glyph [
38066:12 glyph [
37566:13 tight tvar A
38166:13 tight tvar A
37666:15 tvar B
38266:15 tvar B
37766:17 tvar C
38366:17 tvar C
378−66:18 tight glyph ]
384+66:19 tvar D
385+66:20 tight glyph ]
379−66:20 glyph [
386+66:22 glyph [
380−66:21 tight name p
387+66:23 tight name p
381−66:22 tight glyph =
388+66:24 tight glyph =
382−66:23 tight tvar A
389+66:25 tight tvar A
383−66:25 name q
390+66:27 name q
384−66:26 tight glyph =
391+66:28 tight glyph =
385−66:27 tight tvar B
392+66:29 tight tvar B
386−66:29 name r
393+66:31 name r
387−66:30 tight glyph =
388−66:31 tight tvar C
389−66:32 tight glyph ]
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 ]
39068:1 NEWLINE
40068:1 NEWLINE
39168:1 glyph +$
40168:1 glyph +$
392−68:4 name qual
402+68:4 name cord
393−68:9 glyph |$
403+68:9 aura @t
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 ]
41470:1 NEWLINE
40470:1 NEWLINE
41570:1 glyph +$
40570:1 glyph +$
416−70:4 name cord
406+70:4 name knot
417−70:9 aura @t
407+70:9 aura @ta
41872:1 NEWLINE
40872:1 NEWLINE
41972:1 glyph +$
40972:1 glyph +$
420−72:4 name knot
410+72:4 name tape
411+72:9 glyph (
412+72:10 tight name list
421−72:9 aura @ta
413+72:15 aura @tD
414+72:18 tight glyph )
42274:1 NEWLINE
41574:1 NEWLINE
42374:1 glyph +$
41674:1 glyph +$
424−74:4 name tape
417+74:4 name path
42574:9 glyph (
41874:9 glyph (
42674:10 tight name list
41974:10 tight name list
427−74:15 aura @tD
420+74:15 name knot
428−74:18 tight glyph )
421+74:19 tight glyph )
42976:1 NEWLINE
42276:1 NEWLINE
43076:1 glyph +$
42376:1 glyph +$
431−76:4 name path
424+76:4 name tank
432−76:9 glyph (
433−76:10 tight name list
434−76:15 name knot
435−76:19 tight glyph )
436−78:1 NEWLINE
437−78:1 glyph +$
438−78:4 name tank
439−79:3 INDENT
425+77:3 INDENT
440−79:3 name cord
426+77:3 name cord
427+78:3 NEWLINE
428+78:3 glyph [
429+78:4 tight lit %leaf
430+78:10 name p
431+78:11 tight glyph =
432+78:12 tight name tape
433+78:16 tight glyph ]
434+79:3 NEWLINE
435+79:3 glyph [
436+79:4 tight lit %palm
437+79:10 name p
438+79:11 tight glyph =
439+79:12 tight glyph (
440+79:13 tight name qual
441+79:18 name tape
442+79:23 name tape
443+79:28 name tape
444+79:33 name tape
445+79:37 tight glyph )
446+79:39 name q
447+79:40 tight glyph =
448+79:41 tight glyph (
449+79:42 tight name list
450+79:47 name tank
451+79:51 tight glyph )
452+79:52 tight glyph ]
44180:3 NEWLINE
45380:3 NEWLINE
44280:3 glyph [
45480:3 glyph [
443−80:4 tight lit %leaf
455+80:4 tight lit %rose
44480:10 name p
45680:10 name p
44580:11 tight glyph =
45780:11 tight glyph =
446−80:12 tight name tape
458+80:12 tight glyph (
447−80:16 tight glyph ]
448−81:3 NEWLINE
449−81:3 glyph [
450−81:4 tight lit %palm
451−81:10 name p
452−81:11 tight glyph =
453−81:12 tight glyph (
454−81:13 tight name qual
459+80:13 tight name trel
455−81:18 name tape
460+80:18 name tape
456−81:23 name tape
461+80:23 name tape
457−81:28 name tape
462+80:28 name tape
458−81:33 name tape
463+80:32 tight glyph )
464+80:34 name q
465+80:35 tight glyph =
466+80:36 tight glyph (
459−81:37 tight glyph )
467+80:37 tight name list
460−81:39 name q
468+80:42 name tank
461−81:40 tight glyph =
469+80:46 tight glyph )
462−81:41 tight glyph (
463−81:42 tight name list
464−81:47 name tank
465−81:51 tight glyph )
470+80:47 tight glyph ]
466−81:52 tight glyph ]
471+82:1 DEDENT
467−82:3 NEWLINE
472+82:1 NEWLINE
468−82:3 glyph [
473+82:1 glyph +$
469−82:4 tight lit %rose
474+82:4 name nail
475+82:9 glyph [
470−82:10 name p
476+82:10 tight name p
47182:11 tight glyph =
47782:11 tight glyph =
472−82:12 tight glyph (
478+82:12 tight name hair
473−82:13 tight name trel
479+82:17 name q
480+82:18 tight glyph =
474−82:18 name tape
481+82:19 tight name tape
475−82:23 name tape
476−82:28 name tape
477−82:32 tight glyph )
478−82:34 name q
479−82:35 tight glyph =
480−82:36 tight glyph (
481−82:37 tight name list
482−82:42 name tank
483−82:46 tight glyph )
484−82:47 tight glyph ]
482+82:23 tight glyph ]
485−84:1 DEDENT
48684:1 NEWLINE
48384:1 NEWLINE
48784:1 glyph +$
48484:1 glyph +$
488−84:4 name nail
485+84:4 name edge
48984:9 glyph [
48684:9 glyph [
49084:10 tight name p
48784:10 tight name p
49184:11 tight glyph =
48884:11 tight glyph =
49284:12 tight name hair
48984:12 tight name hair
49384:17 name q
49084:17 name q
49484:18 tight glyph =
49184:18 tight glyph =
495−84:19 tight name tape
492+84:19 tight glyph (
493+84:20 tight name unit
494+84:25 glyph [
495+84:26 tight name p
496+84:27 tight glyph =
497+84:28 tight glyph *
498+84:30 name q
499+84:31 tight glyph =
500+84:32 tight name nail
501+84:36 tight glyph ]
502+84:37 tight glyph )
496−84:23 tight glyph ]
503+84:38 tight glyph ]
49786:1 NEWLINE
50486:1 NEWLINE
49886:1 glyph +$
50586:1 glyph +$
499−86:4 name edge
506+86:4 name rule
500−86:9 glyph [
507+86:9 glyph $-(
501−86:10 tight name p
502−86:11 tight glyph =
503−86:12 tight name hair
508+86:12 tight name nail
504−86:17 name q
509+86:17 name edge
505−86:18 tight glyph =
506−86:19 tight glyph (
507−86:20 tight name unit
508−86:25 glyph [
509−86:26 tight name p
510−86:27 tight glyph =
511−86:28 tight glyph *
512−86:30 name q
513−86:31 tight glyph =
514−86:32 tight name nail
515−86:36 tight glyph ]
516−86:37 tight glyph )
510+86:21 tight glyph )
517−86:38 tight glyph ]
51888:1 NEWLINE
51188:1 NEWLINE
51988:1 glyph +$
51288:1 glyph +$
520−88:4 name rule
513+88:4 name spot
521−88:9 glyph $-(
514+88:9 glyph [
515+88:10 tight name p
516+88:11 tight glyph =
522−88:12 tight name nail
517+88:12 tight name path
523−88:17 name edge
518+88:17 name q
519+88:18 tight glyph =
520+88:19 tight name pint
524−88:21 tight glyph )
521+88:23 tight glyph ]
52590:1 NEWLINE
52290:1 NEWLINE
52690:1 glyph +$
52390:1 glyph +$
527−90:4 name spot
524+90:4 name toon
528−90:9 glyph [
525+91:3 INDENT
529−90:10 tight name p
526+91:3 glyph [
530−90:11 tight glyph =
527+91:4 tight lit %0
531−90:12 tight name path
528+91:7 name p
532−90:17 name q
529+91:8 tight glyph =
533−90:18 tight glyph =
530+91:9 tight glyph *
534−90:19 tight name pint
531+91:10 tight glyph ]
535−90:23 tight glyph ]
532+92:3 NEWLINE
536−92:1 NEWLINE
533+92:3 glyph [
537−92:1 glyph +$
534+92:4 tight lit %1
538−92:4 name toon
535+92:7 name p
539−93:3 INDENT
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 %0
541+93:4 tight lit %2
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 (
559−95:10 tight name list
545+93:10 tight name list
560−95:15 name tank
546+93:15 name tank
561−95:19 tight glyph )
547+93:19 tight glyph )
562−95:20 tight glyph ]
548+93:20 tight glyph ]
563−97:1 DEDENT
549+95:1 DEDENT
550+95:1 NEWLINE
551+95:1 glyph +$
552+95:4 name like
553+95:9 glyph |$
554+95:12 glyph [
555+95:13 tight tvar A
556+95:14 tight glyph ]
557+95:16 glyph [
558+95:17 tight name p
559+95:18 tight glyph =
560+95:19 tight name hair
561+95:24 name q
562+95:25 tight glyph =
563+95:26 tight glyph (
564+95:27 tight name unit
565+95:32 glyph [
566+95:33 tight name p
567+95:34 tight glyph =
568+95:35 tight tvar A
569+95:37 name q
570+95:38 tight glyph =
571+95:39 tight name nail
572+95:43 tight glyph ]
573+95:44 tight glyph )
574+95:45 tight glyph ]
56497:1 NEWLINE
57597:1 NEWLINE
565−97:1 glyph +$
576+97:1 glyph ++
566−97:4 name like
567−97:9 glyph |$
568−97:12 glyph [
569−97:13 tight tvar A
570−97:14 tight glyph ]
571−97:16 glyph [
572−97:17 tight name p
573−97:18 tight glyph =
574−97:19 tight name hair
575−97:24 name q
576−97:25 tight glyph =
577−97:26 tight glyph (
578−97:27 tight name unit
579−97:32 glyph [
580−97:33 tight name p
581−97:34 tight glyph =
582−97:35 tight tvar A
583−97:37 name q
584−97:38 tight glyph =
585−97:39 tight name nail
586−97:43 tight glyph ]
587−97:44 tight glyph )
588−97:45 tight glyph ]
589−99:1 NEWLINE
590−99:1 glyph ++
591−99:4 name like
592−99:9 glyph |=
593−99:12 glyph [
594−99:13 tight name f
595−99:14 tight glyph =
596−99:15 tight glyph $-(
597−99:18 tight tvar A
598−99:20 tvar B
599−99:21 tight glyph )
600−99:23 name result
601−99:29 tight glyph =
602−99:30 tight glyph (
603−99:31 tight name like
604−99:36 tvar A
605−99:37 tight glyph )
606−99:38 tight glyph ]
607−100:3 INDENT
608−100:3 glyph ++
609−100:6 name mapped
610−101:5 INDENT
611−101:5 glyph ^-
612−101:8 glyph (
613−101:9 tight name unit
614−101:14 glyph [
615−101:15 tight name p
616−101:16 tight glyph =
617−101:17 tight tvar B
618−101:19 name q
619−101:20 tight glyph =
620−101:21 tight name nail
621−101:25 tight glyph ]
622−101:26 tight glyph )
623−102:7 INDENT
624−102:7 glyph ?-
625−102:10 wing q.result
626−103:9 INDENT
627−103:9 lit ~
628−103:11 lit ~
629−104:9 NEWLINE
630−104:9 glyph [
631−104:10 tight lit ~
632−104:12 name value
633−104:17 tight glyph ]
634−104:19 glyph `
635−104:20 tight glyph [
636−104:21 tight name p
637−104:22 tight glyph =
638−104:23 tight glyph (
639−104:24 tight name f
640−104:26 wing p.value
641−104:33 tight glyph )
642−104:35 name q
643−104:36 tight glyph =
644−104:37 tight wing q.value
645−104:44 tight glyph ]
646−105:3 DEDENT
647−105:3 DEDENT
648−105:3 DEDENT
649−105:3 NEWLINE
650−105:3 glyph ^-
651−105:6 glyph (
652−105:7 tight name like
653−105:12 tvar B
654−105:13 tight glyph )
655−105:15 glyph [
656−105:16 tight name p
657−105:17 tight glyph =
658−105:18 tight wing p.result
659−105:27 name q
660−105:28 tight glyph =
661−105:29 tight name mapped
662−105:35 tight glyph ]
663−107:1 DEDENT
664−107:1 NEWLINE
665−107:1 glyph ++
666−107:4 name wonk
577+97:4 name wonk
667−107:9 glyph |=
578+97:9 glyph |=
668−107:12 name veq
579+97:12 name veq
669−107:15 tight glyph =
580+97:15 tight glyph =
670−107:16 tight glyph (
581+97:16 tight glyph (
671−107:17 tight name like
582+97:17 tight name like
672−107:22 tvar A
583+97:22 tvar A
673−107:23 tight glyph )
584+97:23 tight glyph )
674−108:3 INDENT
585+98:3 INDENT
675−108:3 glyph ?-
586+98:3 glyph ?-
676−108:6 wing q.veq
587+98:6 wing q.veq
677−109:5 INDENT
588+99:5 INDENT
678−109:5 lit ~
589+99:5 lit ~
679−109:7 glyph !!
590+99:7 glyph !!
680−110:5 NEWLINE
591+100:5 NEWLINE
681−110:5 glyph [
592+100:5 glyph [
682−110:6 tight lit ~
593+100:6 tight lit ~
683−110:8 name product
594+100:8 name product
684−110:15 tight glyph ]
595+100:15 tight glyph ]
685−110:17 wing p.product
596+100:17 wing p.product
686−110:26 DEDENT
597+100:26 DEDENT
687−110:26 DEDENT
598+100:26 DEDENT
688−110:26 NEWLINE
599+100:26 NEWLINE
tests/golden/prelude-3g-like/tree.txt+146−184
@@ -87,194 +87,156 @@
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− (cast 40:7
90+ (branch 40:7
91− (apply 40:10 list (tvar 40:16 A))
91+ (wing 40:10 xs)
92− (body 41:9
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (branch 41:9
94− (wing 41:12 xs)
95− (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96− (arm 43:11
93+ (arm 42:9
97− (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
98− (tuple 43:23
95+ (tuple 42:21
99− (wing 43:24 item)
96+ (wing 42:22 item)
100− (group 43:29
97+ (group 42:27
101− (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
102− (value 45:1 turn
99+ (value 44:1 turn
103− (gate 45:9
100+ (gate 44:9
104− (face 45:12 args
101+ (face 44:12 args
105− (cell 45:17
102+ (cell 44:17
106− (apply 45:18 list (tvar 45:24 A))
103+ (apply 44:18 list (tvar 44:24 A))
107− (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
108− (body 46:3
105+ (body 45:3
109− (branch 46:3
106+ (branch 45:3
110− (wing 46:6 args)
107+ (wing 45:6 args)
111− (arm 47:5
108+ (arm 46:5
112− (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
113− (body 48:7
110+ (body 47:7
114− (cast 48:7
111+ (branch 47:7
115− (apply 48:10 list (tvar 48:16 B))
112+ (wing 47:10 xs)
116− (body 49:9
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
117− (branch 49:9
118− (wing 49:12 xs)
119− (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120− (arm 51:11
114+ (arm 49:9
121− (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
122− (tuple 51:23
116+ (tuple 49:21
123− (group 51:24
117+ (group 49:22
124− (call 51:25 (wing 51:25 f) (wing 51:27 item)))
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
125− (group 51:33
119+ (group 49:31
126− (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121+ (mold 51:1 dime
122+ (cell 51:9
123+ (face 51:10 p (aura 51:12 @ta))
124+ (face 51:16 q (aura 51:18 @))))
127− (mold 53:1 dime
125+ (mold 53:1 hair
128 (cell 53:9
126 (cell 53:9
129− (face 53:10 p (aura 53:12 @ta))
127+ (face 53:10 p (aura 53:12 @ud))
130− (face 53:16 q (aura 53:18 @))))
128+ (face 53:16 q (aura 53:18 @ud))))
131− (mold 55:1 hair
129+ (mold 55:1 pint
132 (cell 55:9
130 (cell 55:9
133− (face 55:10 p (aura 55:12 @ud))
131+ (face 55:10 p
134− (face 55:16 q (aura 55:18 @ud))))
135− (mold 57:1 pint
136− (cell 57:9
137− (face 57:10 p
138− (cell 57:12
132+ (cell 55:12
139− (face 57:13 p (aura 57:15 @))
133+ (face 55:13 p (aura 55:15 @))
140− (face 57:17 q (aura 57:19 @))))
134+ (face 55:17 q (aura 55:19 @))))
141− (face 57:22 q
135+ (face 55:22 q
142− (cell 57:24
136+ (cell 55:24
143− (face 57:25 p (aura 57:27 @))
137+ (face 55:25 p (aura 55:27 @))
144− (face 57:29 q (aura 57:31 @))))))
138+ (face 55:29 q (aura 55:31 @))))))
145− (mold 59:1 coin
139+ (mold 57:1 coin
146− (union 60:3
140+ (union 58:3
141+ (cell 58:3
142+ (const 58:4 %$)
143+ (face 58:7 p (ref 58:9 dime)))
144+ (cell 59:3
145+ (const 59:4 %blob)
146+ (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %$)
148+ (const 60:4 %many)
149− (face 60:7 p (ref 60:9 dime)))
150− (cell 61:3
151− (const 61:4 %blob)
152− (face 61:10 p (noun 61:12)))
153− (cell 62:3
154− (const 62:4 %many)
155− (face 62:10 p
149+ (face 60:10 p
156− (apply 62:12 list (ref 62:18 coin))))))
150+ (apply 60:12 list (ref 60:18 coin))))))
157− (mold 64:1 pair
151+ (mold 62:1 pair
158− (generic 64:9 A B
152+ (generic 62:9 A B
159− (cell 64:18
153+ (cell 62:18
160− (face 64:19 p (tvar 64:21 A))
154+ (face 62:19 p (tvar 62:21 A))
161− (face 64:23 q (tvar 64:25 B)))))
155+ (face 62:23 q (tvar 62:25 B)))))
162− (mold 66:1 trel
156+ (mold 64:1 trel
163− (generic 66:9 A B C
157+ (generic 64:9 A B C
164− (cell 66:20
158+ (cell 64:20
165− (face 66:21 p (tvar 66:23 A))
159+ (face 64:21 p (tvar 64:23 A))
166− (face 66:25 q (tvar 66:27 B))
160+ (face 64:25 q (tvar 64:27 B))
167− (face 66:29 r (tvar 66:31 C)))))
161+ (face 64:29 r (tvar 64:31 C)))))
168− (mold 68:1 qual
162+ (mold 66:1 qual
169− (generic 68:9 A B C D
163+ (generic 66:9 A B C D
170− (cell 68:22
164+ (cell 66:22
171− (face 68:23 p (tvar 68:25 A))
165+ (face 66:23 p (tvar 66:25 A))
172− (face 68:27 q (tvar 68:29 B))
166+ (face 66:27 q (tvar 66:29 B))
173− (face 68:31 r (tvar 68:33 C))
167+ (face 66:31 r (tvar 66:33 C))
174− (face 68:35 s (tvar 68:37 D)))))
168+ (face 66:35 s (tvar 66:37 D)))))
175− (mold 70:1 cord (aura 70:9 @t))
169+ (mold 68:1 cord (aura 68:9 @t))
176− (mold 72:1 knot (aura 72:9 @ta))
170+ (mold 70:1 knot (aura 70:9 @ta))
177− (mold 74:1 tape
171+ (mold 72:1 tape
178− (apply 74:9 list (aura 74:15 @tD)))
172+ (apply 72:9 list (aura 72:15 @tD)))
179− (mold 76:1 path
173+ (mold 74:1 path
180− (apply 76:9 list (ref 76:15 knot)))
174+ (apply 74:9 list (ref 74:15 knot)))
181− (mold 78:1 tank
175+ (mold 76:1 tank
182− (union 79:3
176+ (union 77:3
183− (ref 79:3 cord)
177+ (ref 77:3 cord)
178+ (cell 78:3
179+ (const 78:4 %leaf)
180+ (face 78:10 p (ref 78:12 tape)))
181+ (cell 79:3
182+ (const 79:4 %palm)
183+ (face 79:10 p
184+ (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185+ (face 79:39 q
186+ (apply 79:41 list (ref 79:47 tank))))
184 (cell 80:3
187 (cell 80:3
185− (const 80:4 %leaf)
188+ (const 80:4 %rose)
186− (face 80:10 p (ref 80:12 tape)))
187− (cell 81:3
188− (const 81:4 %palm)
189− (face 81:10 p
190− (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191− (face 81:39 q
192− (apply 81:41 list (ref 81:47 tank))))
193− (cell 82:3
194− (const 82:4 %rose)
195− (face 82:10 p
189+ (face 80:10 p
196− (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
190+ (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
197− (face 82:34 q
191+ (face 80:34 q
198− (apply 82:36 list (ref 82:42 tank))))))
192+ (apply 80:36 list (ref 80:42 tank))))))
199− (mold 84:1 nail
193+ (mold 82:1 nail
194+ (cell 82:9
195+ (face 82:10 p (ref 82:12 hair))
196+ (face 82:17 q (ref 82:19 tape))))
197+ (mold 84:1 edge
200 (cell 84:9
198 (cell 84:9
201 (face 84:10 p (ref 84:12 hair))
199 (face 84:10 p (ref 84:12 hair))
202− (face 84:17 q (ref 84:19 tape))))
200+ (face 84:17 q
203− (mold 86:1 edge
204− (cell 86:9
205− (face 86:10 p (ref 86:12 hair))
206− (face 86:17 q
207− (apply 86:19 unit
201+ (apply 84:19 unit
208− (cell 86:25
202+ (cell 84:25
209− (face 86:26 p (noun 86:28))
203+ (face 84:26 p (noun 84:28))
210− (face 86:30 q (ref 86:32 nail)))))))
204+ (face 84:30 q (ref 84:32 nail)))))))
211− (mold 88:1 rule
205+ (mold 86:1 rule
212− (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
206+ (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
213− (mold 90:1 spot
207+ (mold 88:1 spot
214− (cell 90:9
208+ (cell 88:9
215− (face 90:10 p (ref 90:12 path))
209+ (face 88:10 p (ref 88:12 path))
216− (face 90:17 q (ref 90:19 pint))))
210+ (face 88:17 q (ref 88:19 pint))))
217− (mold 92:1 toon
211+ (mold 90:1 toon
218− (union 93:3
212+ (union 91:3
213+ (cell 91:3
214+ (const 91:4 %0)
215+ (face 91:7 p (noun 91:9)))
216+ (cell 92:3
217+ (const 92:4 %1)
218+ (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %0)
220+ (const 93:4 %2)
221− (face 93:7 p (noun 93:9)))
222− (cell 94:3
223− (const 94:4 %1)
224− (face 94:7 p (noun 94:9)))
225− (cell 95:3
226− (const 95:4 %2)
227− (face 95:7 p
221+ (face 93:7 p
228− (apply 95:9 list (ref 95:15 tank))))))
222+ (apply 93:9 list (ref 93:15 tank))))))
229− (mold 97:1 like
223+ (mold 95:1 like
230− (generic 97:9 A
224+ (generic 95:9 A
231− (cell 97:16
225+ (cell 95:16
232− (face 97:17 p (ref 97:19 hair))
226+ (face 95:17 p (ref 95:19 hair))
233− (face 97:24 q
227+ (face 95:24 q
234− (apply 97:26 unit
228+ (apply 95:26 unit
235− (cell 97:32
229+ (cell 95:32
236− (face 97:33 p (tvar 97:35 A))
230+ (face 95:33 p (tvar 95:35 A))
237− (face 97:37 q (ref 97:39 nail))))))))
231+ (face 95:37 q (ref 95:39 nail))))))))
238− (value 99:1 like
232+ (value 97:1 wonk
239− (gate 99:9
240− (cell 99:12
241− (face 99:13 f
242− (fn 99:15 (tvar 99:18 A) (tvar 99:20 B)))
243− (face 99:23 result
244− (apply 99:30 like (tvar 99:36 A))))
245− (body 100:3
246− (value 100:3 mapped
247− (body 101:5
248− (cast 101:5
249− (apply 101:8 unit
250− (cell 101:14
251− (face 101:15 p (tvar 101:17 B))
252− (face 101:19 q (ref 101:21 nail))))
253− (body 102:7
254− (branch 102:7
255− (wing 102:10 q.result)
256− (arm 103:9 (lit 103:9 ~) (lit 103:11 ~))
257− (arm 104:9
258− (cell 104:9 (lit 104:10 ~) (bind 104:12 value))
259− (unit 104:19
260− (tuple 104:20
261− (face 104:21 p
262− (group 104:23
263− (call 104:24 (wing 104:24 f) (wing 104:26 p.value))))
264− (face 104:35 q (wing 104:37 q.value))))))))))
265− (cast 105:3
266− (apply 105:6 like (tvar 105:12 B))
267− (tuple 105:15
268− (face 105:16 p (wing 105:18 p.result))
269− (face 105:27 q (wing 105:29 mapped)))))))
270− (value 107:1 wonk
271− (gate 107:9
233+ (gate 97:9
272− (face 107:12 veq
234+ (face 97:12 veq
273− (apply 107:16 like (tvar 107:22 A)))
235+ (apply 97:16 like (tvar 97:22 A)))
274− (body 108:3
236+ (body 98:3
275− (branch 108:3
237+ (branch 98:3
276− (wing 108:6 q.veq)
238+ (wing 98:6 q.veq)
277− (arm 109:5 (lit 109:5 ~) (crash 109:7))
239+ (arm 99:5 (lit 99:5 ~) (crash 99:7))
278− (arm 110:5
240+ (arm 100:5
279− (cell 110:5 (lit 110:6 ~) (bind 110:8 product))
241+ (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
280− (wing 110:17 p.product)))))))
242+ (wing 100:17 p.product)))))))
tests/golden/prelude-3g-like/types.txt−1
@@ -27,5 +27,4 @@ partial inference; module not checked
27+$ spot: not checked
27+$ spot: not checked
28+$ toon: cases proven disjoint; mold not checked
28+$ toon: cases proven disjoint; mold not checked
29+$ like: not checked
29+$ like: not checked
30−++ like: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
30++ wonk: sample mold is not supported by partial inference
tests/golden/prelude-3g-structural/source.jibb+6−8
@@ -37,18 +37,16 @@
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)
41− ?- xs
40+ ?- xs
42− ~ ys
41+ ~ ys
43− [item rest] [item (weld rest ys)]
42+ [item rest] [item (weld rest ys)]
44
43
45++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
46 ?- args
45 ?- args
47 [xs f]
46 [xs f]
48− ^- (list B)
49− ?- xs
47+ ?- xs
50− ~ ~
48+ ~ ~
51− [item rest] [(f item) (turn rest f)]
49+ [item rest] [(f item) (turn rest f)]
52
50
53+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
54
52
tests/golden/prelude-3g-structural/tokens.txt+295−309
@@ -190,375 +190,361 @@
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 glyph (
194+40:10 name xs
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
19841:9 INDENT
19541:9 INDENT
199−41:9 glyph ?-
200−41:12 name xs
201−42:11 INDENT
202−42:11 lit ~
196+41:9 lit ~
203−42:13 name ys
197+41:11 name ys
204−43:11 NEWLINE
198+42:9 NEWLINE
205−43:11 glyph [
199+42:9 glyph [
206−43:12 tight name item
200+42:10 tight name item
207−43:17 name rest
201+42:15 name rest
208−43:21 tight glyph ]
202+42:19 tight glyph ]
209−43:23 glyph [
203+42:21 glyph [
210−43:24 tight name item
204+42:22 tight name item
211−43:29 glyph (
205+42:27 glyph (
212−43:30 tight name weld
206+42:28 tight name weld
213−43:35 name rest
207+42:33 name rest
214−43:40 name ys
208+42:38 name ys
215−43:42 tight glyph )
209+42:40 tight glyph )
216−43:43 tight glyph ]
210+42:41 tight glyph ]
217−45:1 DEDENT
211+44:1 DEDENT
218−45:1 DEDENT
219−45:1 DEDENT
212+44:1 DEDENT
220−45:1 DEDENT
213+44:1 DEDENT
221−45:1 DEDENT
214+44:1 DEDENT
222−45:1 NEWLINE
215+44:1 NEWLINE
223−45:1 glyph ++
216+44:1 glyph ++
224−45:4 name turn
217+44:4 name turn
225−45:9 glyph |=
218+44:9 glyph |=
226−45:12 name args
219+44:12 name args
227−45:16 tight glyph =
220+44:16 tight glyph =
228−45:17 tight glyph [
221+44:17 tight glyph [
229−45:18 tight glyph (
222+44:18 tight glyph (
230−45:19 tight name list
223+44:19 tight name list
231−45:24 tvar A
224+44:24 tvar A
232−45:25 tight glyph )
225+44:25 tight glyph )
233−45:27 glyph $-(
226+44:27 glyph $-(
234−45:30 tight tvar A
227+44:30 tight tvar A
235−45:32 tvar B
228+44:32 tvar B
236−45:33 tight glyph )
229+44:33 tight glyph )
237−45:34 tight glyph ]
230+44:34 tight glyph ]
238−46:3 INDENT
231+45:3 INDENT
239−46:3 glyph ?-
232+45:3 glyph ?-
240−46:6 name args
233+45:6 name args
241−47:5 INDENT
234+46:5 INDENT
242−47:5 glyph [
235+46:5 glyph [
243−47:6 tight name xs
236+46:6 tight name xs
244−47:9 name f
237+46:9 name f
245−47:10 tight glyph ]
238+46:10 tight glyph ]
246−48:7 INDENT
239+47:7 INDENT
247−48:7 glyph ^-
240+47:7 glyph ?-
248−48:10 glyph (
241+47:10 name xs
249−48:11 tight name list
250−48:16 tvar B
251−48:17 tight glyph )
252−49:9 INDENT
242+48:9 INDENT
253−49:9 glyph ?-
254−49:12 name xs
255−50:11 INDENT
256−50:11 lit ~
243+48:9 lit ~
257−50:13 lit ~
244+48:11 lit ~
258−51:11 NEWLINE
245+49:9 NEWLINE
259−51:11 glyph [
246+49:9 glyph [
260−51:12 tight name item
247+49:10 tight name item
261−51:17 name rest
248+49:15 name rest
262−51:21 tight glyph ]
249+49:19 tight glyph ]
263−51:23 glyph [
250+49:21 glyph [
264−51:24 tight glyph (
251+49:22 tight glyph (
265−51:25 tight name f
252+49:23 tight name f
266−51:27 name item
253+49:25 name item
254+49:29 tight glyph )
267−51:31 tight glyph )
255+49:31 glyph (
268−51:33 glyph (
269−51:34 tight name turn
256+49:32 tight name turn
270−51:39 name rest
257+49:37 name rest
271−51:44 name f
258+49:42 name f
272−51:45 tight glyph )
259+49:43 tight glyph )
273−51:46 tight glyph ]
260+49:44 tight glyph ]
274−53:1 DEDENT
261+51:1 DEDENT
275−53:1 DEDENT
262+51:1 DEDENT
276−53:1 DEDENT
263+51:1 DEDENT
277−53:1 DEDENT
264+51:1 DEDENT
278−53:1 DEDENT
265+51:1 NEWLINE
266+51:1 glyph +$
267+51:4 name dime
268+51:9 glyph [
269+51:10 tight name p
270+51:11 tight glyph =
271+51:12 tight aura @ta
272+51:16 name q
273+51:17 tight glyph =
274+51:18 tight aura @
275+51:19 tight glyph ]
27953:1 NEWLINE
27653:1 NEWLINE
28053:1 glyph +$
27753:1 glyph +$
281−53:4 name dime
278+53:4 name hair
28253:9 glyph [
27953:9 glyph [
28353:10 tight name p
28053:10 tight name p
28453:11 tight glyph =
28153:11 tight glyph =
285−53:12 tight aura @ta
282+53:12 tight aura @ud
28653:16 name q
28353:16 name q
28753:17 tight glyph =
28453:17 tight glyph =
288−53:18 tight aura @
285+53:18 tight aura @ud
289−53:19 tight glyph ]
286+53:21 tight glyph ]
29055:1 NEWLINE
28755:1 NEWLINE
29155:1 glyph +$
28855:1 glyph +$
292−55:4 name hair
289+55:4 name pint
29355:9 glyph [
29055:9 glyph [
29455:10 tight name p
29155:10 tight name p
29555:11 tight glyph =
29255:11 tight glyph =
296−55:12 tight aura @ud
293+55:12 tight glyph [
297−55:16 name q
294+55:13 tight name p
298−55:17 tight glyph =
295+55:14 tight glyph =
296+55:15 tight aura @
297+55:17 name q
299−55:18 tight aura @ud
298+55:18 tight glyph =
299+55:19 tight aura @
300+55:20 tight glyph ]
301+55:22 name q
302+55:23 tight glyph =
303+55:24 tight glyph [
304+55:25 tight name p
305+55:26 tight glyph =
306+55:27 tight aura @
307+55:29 name q
308+55:30 tight glyph =
309+55:31 tight aura @
310+55:32 tight glyph ]
300−55:21 tight glyph ]
311+55:33 tight glyph ]
30157:1 NEWLINE
31257:1 NEWLINE
30257:1 glyph +$
31357:1 glyph +$
303−57:4 name pint
314+57:4 name coin
315+58:3 INDENT
316+58:3 glyph [
317+58:4 tight lit %$
318+58:7 name p
319+58:8 tight glyph =
320+58:9 tight name dime
304−57:9 glyph [
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
305−57:10 tight name p
325+59:10 name p
306−57:11 tight glyph =
326+59:11 tight glyph =
307−57:12 tight glyph [
327+59:12 tight glyph *
308−57:13 tight name p
328+59:13 tight glyph ]
309−57:14 tight glyph =
329+60:3 NEWLINE
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 %$
331+60:4 tight lit %many
332−60:7 name p
333−60:8 tight glyph =
334−60:9 tight name dime
335−60:13 tight glyph ]
336−61:3 NEWLINE
337−61:3 glyph [
338−61:4 tight lit %blob
339−61:10 name p
340−61:11 tight glyph =
341−61:12 tight glyph *
342−61:13 tight glyph ]
343−62:3 NEWLINE
344−62:3 glyph [
345−62:4 tight lit %many
346−62:10 name p
332+60:10 name p
347−62:11 tight glyph =
333+60:11 tight glyph =
348−62:12 tight glyph (
334+60:12 tight glyph (
349−62:13 tight name list
335+60:13 tight name list
350−62:18 name coin
336+60:18 name coin
351−62:22 tight glyph )
337+60:22 tight glyph )
352−62:23 tight glyph ]
338+60:23 tight glyph ]
353−64:1 DEDENT
339+62:1 DEDENT
340+62:1 NEWLINE
341+62:1 glyph +$
342+62:4 name pair
343+62:9 glyph |$
344+62:12 glyph [
345+62:13 tight tvar A
346+62:15 tvar B
347+62:16 tight glyph ]
348+62:18 glyph [
349+62:19 tight name p
350+62:20 tight glyph =
351+62:21 tight tvar A
352+62:23 name q
353+62:24 tight glyph =
354+62:25 tight tvar B
355+62:26 tight glyph ]
35464:1 NEWLINE
35664:1 NEWLINE
35564:1 glyph +$
35764:1 glyph +$
356−64:4 name pair
358+64:4 name trel
35764:9 glyph |$
35964:9 glyph |$
35864:12 glyph [
36064:12 glyph [
35964:13 tight tvar A
36164:13 tight tvar A
36064:15 tvar B
36264:15 tvar B
361−64:16 tight glyph ]
363+64:17 tvar C
364+64:18 tight glyph ]
362−64:18 glyph [
365+64:20 glyph [
363−64:19 tight name p
364−64:20 tight glyph =
365−64:21 tight tvar A
366+64:21 tight name p
366−64:23 name q
367+64:22 tight glyph =
367−64:24 tight glyph =
368+64:23 tight tvar A
369+64:25 name q
370+64:26 tight glyph =
368−64:25 tight tvar B
371+64:27 tight tvar B
372+64:29 name r
373+64:30 tight glyph =
374+64:31 tight tvar C
369−64:26 tight glyph ]
375+64:32 tight glyph ]
37066:1 NEWLINE
37666:1 NEWLINE
37166:1 glyph +$
37766:1 glyph +$
372−66:4 name trel
378+66:4 name qual
37366:9 glyph |$
37966:9 glyph |$
37466:12 glyph [
38066:12 glyph [
37566:13 tight tvar A
38166:13 tight tvar A
37666:15 tvar B
38266:15 tvar B
37766:17 tvar C
38366:17 tvar C
378−66:18 tight glyph ]
384+66:19 tvar D
385+66:20 tight glyph ]
379−66:20 glyph [
386+66:22 glyph [
380−66:21 tight name p
387+66:23 tight name p
381−66:22 tight glyph =
388+66:24 tight glyph =
382−66:23 tight tvar A
389+66:25 tight tvar A
383−66:25 name q
390+66:27 name q
384−66:26 tight glyph =
391+66:28 tight glyph =
385−66:27 tight tvar B
392+66:29 tight tvar B
386−66:29 name r
393+66:31 name r
387−66:30 tight glyph =
388−66:31 tight tvar C
389−66:32 tight glyph ]
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 ]
39068:1 NEWLINE
40068:1 NEWLINE
39168:1 glyph +$
40168:1 glyph +$
392−68:4 name qual
402+68:4 name cord
393−68:9 glyph |$
403+68:9 aura @t
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 ]
41470:1 NEWLINE
40470:1 NEWLINE
41570:1 glyph +$
40570:1 glyph +$
416−70:4 name cord
406+70:4 name knot
417−70:9 aura @t
407+70:9 aura @ta
41872:1 NEWLINE
40872:1 NEWLINE
41972:1 glyph +$
40972:1 glyph +$
420−72:4 name knot
410+72:4 name tape
411+72:9 glyph (
412+72:10 tight name list
421−72:9 aura @ta
413+72:15 aura @tD
414+72:18 tight glyph )
42274:1 NEWLINE
41574:1 NEWLINE
42374:1 glyph +$
41674:1 glyph +$
424−74:4 name tape
417+74:4 name path
42574:9 glyph (
41874:9 glyph (
42674:10 tight name list
41974:10 tight name list
427−74:15 aura @tD
420+74:15 name knot
428−74:18 tight glyph )
421+74:19 tight glyph )
42976:1 NEWLINE
42276:1 NEWLINE
43076:1 glyph +$
42376:1 glyph +$
431−76:4 name path
424+76:4 name tank
432−76:9 glyph (
433−76:10 tight name list
434−76:15 name knot
435−76:19 tight glyph )
436−78:1 NEWLINE
437−78:1 glyph +$
438−78:4 name tank
439−79:3 INDENT
425+77:3 INDENT
440−79:3 name cord
426+77:3 name cord
427+78:3 NEWLINE
428+78:3 glyph [
429+78:4 tight lit %leaf
430+78:10 name p
431+78:11 tight glyph =
432+78:12 tight name tape
433+78:16 tight glyph ]
434+79:3 NEWLINE
435+79:3 glyph [
436+79:4 tight lit %palm
437+79:10 name p
438+79:11 tight glyph =
439+79:12 tight glyph (
440+79:13 tight name qual
441+79:18 name tape
442+79:23 name tape
443+79:28 name tape
444+79:33 name tape
445+79:37 tight glyph )
446+79:39 name q
447+79:40 tight glyph =
448+79:41 tight glyph (
449+79:42 tight name list
450+79:47 name tank
451+79:51 tight glyph )
452+79:52 tight glyph ]
44180:3 NEWLINE
45380:3 NEWLINE
44280:3 glyph [
45480:3 glyph [
443−80:4 tight lit %leaf
455+80:4 tight lit %rose
44480:10 name p
45680:10 name p
44580:11 tight glyph =
45780:11 tight glyph =
446−80:12 tight name tape
458+80:12 tight glyph (
447−80:16 tight glyph ]
448−81:3 NEWLINE
449−81:3 glyph [
450−81:4 tight lit %palm
451−81:10 name p
452−81:11 tight glyph =
453−81:12 tight glyph (
454−81:13 tight name qual
459+80:13 tight name trel
455−81:18 name tape
460+80:18 name tape
456−81:23 name tape
461+80:23 name tape
457−81:28 name tape
462+80:28 name tape
458−81:33 name tape
463+80:32 tight glyph )
464+80:34 name q
465+80:35 tight glyph =
466+80:36 tight glyph (
459−81:37 tight glyph )
467+80:37 tight name list
460−81:39 name q
468+80:42 name tank
461−81:40 tight glyph =
469+80:46 tight glyph )
462−81:41 tight glyph (
463−81:42 tight name list
464−81:47 name tank
465−81:51 tight glyph )
470+80:47 tight glyph ]
466−81:52 tight glyph ]
471+82:1 DEDENT
467−82:3 NEWLINE
472+82:1 NEWLINE
468−82:3 glyph [
473+82:1 glyph +$
469−82:4 tight lit %rose
474+82:4 name nail
475+82:9 glyph [
470−82:10 name p
476+82:10 tight name p
47182:11 tight glyph =
47782:11 tight glyph =
472−82:12 tight glyph (
478+82:12 tight name hair
473−82:13 tight name trel
479+82:17 name q
480+82:18 tight glyph =
474−82:18 name tape
481+82:19 tight name tape
475−82:23 name tape
476−82:28 name tape
477−82:32 tight glyph )
478−82:34 name q
479−82:35 tight glyph =
480−82:36 tight glyph (
481−82:37 tight name list
482−82:42 name tank
483−82:46 tight glyph )
484−82:47 tight glyph ]
482+82:23 tight glyph ]
485−84:1 DEDENT
48684:1 NEWLINE
48384:1 NEWLINE
48784:1 glyph +$
48484:1 glyph +$
488−84:4 name nail
485+84:4 name edge
48984:9 glyph [
48684:9 glyph [
49084:10 tight name p
48784:10 tight name p
49184:11 tight glyph =
48884:11 tight glyph =
49284:12 tight name hair
48984:12 tight name hair
49384:17 name q
49084:17 name q
49484:18 tight glyph =
49184:18 tight glyph =
495−84:19 tight name tape
492+84:19 tight glyph (
493+84:20 tight name unit
494+84:25 glyph [
495+84:26 tight name p
496+84:27 tight glyph =
497+84:28 tight glyph *
498+84:30 name q
499+84:31 tight glyph =
500+84:32 tight name nail
501+84:36 tight glyph ]
502+84:37 tight glyph )
496−84:23 tight glyph ]
503+84:38 tight glyph ]
49786:1 NEWLINE
50486:1 NEWLINE
49886:1 glyph +$
50586:1 glyph +$
499−86:4 name edge
506+86:4 name rule
500−86:9 glyph [
507+86:9 glyph $-(
501−86:10 tight name p
502−86:11 tight glyph =
503−86:12 tight name hair
508+86:12 tight name nail
504−86:17 name q
509+86:17 name edge
505−86:18 tight glyph =
506−86:19 tight glyph (
507−86:20 tight name unit
508−86:25 glyph [
509−86:26 tight name p
510−86:27 tight glyph =
511−86:28 tight glyph *
512−86:30 name q
513−86:31 tight glyph =
514−86:32 tight name nail
515−86:36 tight glyph ]
516−86:37 tight glyph )
510+86:21 tight glyph )
517−86:38 tight glyph ]
51888:1 NEWLINE
51188:1 NEWLINE
51988:1 glyph +$
51288:1 glyph +$
520−88:4 name rule
513+88:4 name spot
521−88:9 glyph $-(
514+88:9 glyph [
515+88:10 tight name p
516+88:11 tight glyph =
522−88:12 tight name nail
517+88:12 tight name path
523−88:17 name edge
518+88:17 name q
519+88:18 tight glyph =
520+88:19 tight name pint
524−88:21 tight glyph )
521+88:23 tight glyph ]
52590:1 NEWLINE
52290:1 NEWLINE
52690:1 glyph +$
52390:1 glyph +$
527−90:4 name spot
524+90:4 name toon
528−90:9 glyph [
525+91:3 INDENT
529−90:10 tight name p
526+91:3 glyph [
530−90:11 tight glyph =
527+91:4 tight lit %0
531−90:12 tight name path
528+91:7 name p
532−90:17 name q
529+91:8 tight glyph =
533−90:18 tight glyph =
530+91:9 tight glyph *
534−90:19 tight name pint
531+91:10 tight glyph ]
535−90:23 tight glyph ]
532+92:3 NEWLINE
536−92:1 NEWLINE
533+92:3 glyph [
537−92:1 glyph +$
534+92:4 tight lit %1
538−92:4 name toon
535+92:7 name p
539−93:3 INDENT
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 %0
541+93:4 tight lit %2
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 (
559−95:10 tight name list
545+93:10 tight name list
560−95:15 name tank
546+93:15 name tank
561−95:19 tight glyph )
547+93:19 tight glyph )
562−95:20 tight glyph ]
548+93:20 tight glyph ]
563−95:21 DEDENT
549+93:21 DEDENT
564−95:21 NEWLINE
550+93:21 NEWLINE
tests/golden/prelude-3g-structural/tree.txt+126−132
@@ -87,142 +87,136 @@
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− (cast 40:7
90+ (branch 40:7
91− (apply 40:10 list (tvar 40:16 A))
91+ (wing 40:10 xs)
92− (body 41:9
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (branch 41:9
94− (wing 41:12 xs)
95− (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
96− (arm 43:11
93+ (arm 42:9
97− (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
98− (tuple 43:23
95+ (tuple 42:21
99− (wing 43:24 item)
96+ (wing 42:22 item)
100− (group 43:29
97+ (group 42:27
101− (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
102− (value 45:1 turn
99+ (value 44:1 turn
103− (gate 45:9
100+ (gate 44:9
104− (face 45:12 args
101+ (face 44:12 args
105− (cell 45:17
102+ (cell 44:17
106− (apply 45:18 list (tvar 45:24 A))
103+ (apply 44:18 list (tvar 44:24 A))
107− (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
108− (body 46:3
105+ (body 45:3
109− (branch 46:3
106+ (branch 45:3
110− (wing 46:6 args)
107+ (wing 45:6 args)
111− (arm 47:5
108+ (arm 46:5
112− (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
113− (body 48:7
110+ (body 47:7
114− (cast 48:7
111+ (branch 47:7
115− (apply 48:10 list (tvar 48:16 B))
112+ (wing 47:10 xs)
116− (body 49:9
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
117− (branch 49:9
118− (wing 49:12 xs)
119− (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
120− (arm 51:11
114+ (arm 49:9
121− (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
122− (tuple 51:23
116+ (tuple 49:21
123− (group 51:24
117+ (group 49:22
124− (call 51:25 (wing 51:25 f) (wing 51:27 item)))
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
125− (group 51:33
119+ (group 49:31
126− (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121+ (mold 51:1 dime
122+ (cell 51:9
123+ (face 51:10 p (aura 51:12 @ta))
124+ (face 51:16 q (aura 51:18 @))))
127− (mold 53:1 dime
125+ (mold 53:1 hair
128 (cell 53:9
126 (cell 53:9
129− (face 53:10 p (aura 53:12 @ta))
127+ (face 53:10 p (aura 53:12 @ud))
130− (face 53:16 q (aura 53:18 @))))
128+ (face 53:16 q (aura 53:18 @ud))))
131− (mold 55:1 hair
129+ (mold 55:1 pint
132 (cell 55:9
130 (cell 55:9
133− (face 55:10 p (aura 55:12 @ud))
131+ (face 55:10 p
134− (face 55:16 q (aura 55:18 @ud))))
135− (mold 57:1 pint
136− (cell 57:9
137− (face 57:10 p
138− (cell 57:12
132+ (cell 55:12
139− (face 57:13 p (aura 57:15 @))
133+ (face 55:13 p (aura 55:15 @))
140− (face 57:17 q (aura 57:19 @))))
134+ (face 55:17 q (aura 55:19 @))))
141− (face 57:22 q
135+ (face 55:22 q
142− (cell 57:24
136+ (cell 55:24
143− (face 57:25 p (aura 57:27 @))
137+ (face 55:25 p (aura 55:27 @))
144− (face 57:29 q (aura 57:31 @))))))
138+ (face 55:29 q (aura 55:31 @))))))
145− (mold 59:1 coin
139+ (mold 57:1 coin
146− (union 60:3
140+ (union 58:3
141+ (cell 58:3
142+ (const 58:4 %$)
143+ (face 58:7 p (ref 58:9 dime)))
144+ (cell 59:3
145+ (const 59:4 %blob)
146+ (face 59:10 p (noun 59:12)))
147 (cell 60:3
147 (cell 60:3
148− (const 60:4 %$)
148+ (const 60:4 %many)
149− (face 60:7 p (ref 60:9 dime)))
150− (cell 61:3
151− (const 61:4 %blob)
152− (face 61:10 p (noun 61:12)))
153− (cell 62:3
154− (const 62:4 %many)
155− (face 62:10 p
149+ (face 60:10 p
156− (apply 62:12 list (ref 62:18 coin))))))
150+ (apply 60:12 list (ref 60:18 coin))))))
157− (mold 64:1 pair
151+ (mold 62:1 pair
158− (generic 64:9 A B
152+ (generic 62:9 A B
159− (cell 64:18
153+ (cell 62:18
160− (face 64:19 p (tvar 64:21 A))
154+ (face 62:19 p (tvar 62:21 A))
161− (face 64:23 q (tvar 64:25 B)))))
155+ (face 62:23 q (tvar 62:25 B)))))
162− (mold 66:1 trel
156+ (mold 64:1 trel
163− (generic 66:9 A B C
157+ (generic 64:9 A B C
164− (cell 66:20
158+ (cell 64:20
165− (face 66:21 p (tvar 66:23 A))
159+ (face 64:21 p (tvar 64:23 A))
166− (face 66:25 q (tvar 66:27 B))
160+ (face 64:25 q (tvar 64:27 B))
167− (face 66:29 r (tvar 66:31 C)))))
161+ (face 64:29 r (tvar 64:31 C)))))
168− (mold 68:1 qual
162+ (mold 66:1 qual
169− (generic 68:9 A B C D
163+ (generic 66:9 A B C D
170− (cell 68:22
164+ (cell 66:22
171− (face 68:23 p (tvar 68:25 A))
165+ (face 66:23 p (tvar 66:25 A))
172− (face 68:27 q (tvar 68:29 B))
166+ (face 66:27 q (tvar 66:29 B))
173− (face 68:31 r (tvar 68:33 C))
167+ (face 66:31 r (tvar 66:33 C))
174− (face 68:35 s (tvar 68:37 D)))))
168+ (face 66:35 s (tvar 66:37 D)))))
175− (mold 70:1 cord (aura 70:9 @t))
169+ (mold 68:1 cord (aura 68:9 @t))
176− (mold 72:1 knot (aura 72:9 @ta))
170+ (mold 70:1 knot (aura 70:9 @ta))
177− (mold 74:1 tape
171+ (mold 72:1 tape
178− (apply 74:9 list (aura 74:15 @tD)))
172+ (apply 72:9 list (aura 72:15 @tD)))
179− (mold 76:1 path
173+ (mold 74:1 path
180− (apply 76:9 list (ref 76:15 knot)))
174+ (apply 74:9 list (ref 74:15 knot)))
181− (mold 78:1 tank
175+ (mold 76:1 tank
182− (union 79:3
176+ (union 77:3
183− (ref 79:3 cord)
177+ (ref 77:3 cord)
178+ (cell 78:3
179+ (const 78:4 %leaf)
180+ (face 78:10 p (ref 78:12 tape)))
181+ (cell 79:3
182+ (const 79:4 %palm)
183+ (face 79:10 p
184+ (apply 79:12 qual (ref 79:18 tape) (ref 79:23 tape) (ref 79:28 tape) (ref 79:33 tape)))
185+ (face 79:39 q
186+ (apply 79:41 list (ref 79:47 tank))))
184 (cell 80:3
187 (cell 80:3
185− (const 80:4 %leaf)
188+ (const 80:4 %rose)
186− (face 80:10 p (ref 80:12 tape)))
187− (cell 81:3
188− (const 81:4 %palm)
189− (face 81:10 p
190− (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
191− (face 81:39 q
192− (apply 81:41 list (ref 81:47 tank))))
193− (cell 82:3
194− (const 82:4 %rose)
195− (face 82:10 p
189+ (face 80:10 p
196− (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
190+ (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
197− (face 82:34 q
191+ (face 80:34 q
198− (apply 82:36 list (ref 82:42 tank))))))
192+ (apply 80:36 list (ref 80:42 tank))))))
199− (mold 84:1 nail
193+ (mold 82:1 nail
194+ (cell 82:9
195+ (face 82:10 p (ref 82:12 hair))
196+ (face 82:17 q (ref 82:19 tape))))
197+ (mold 84:1 edge
200 (cell 84:9
198 (cell 84:9
201 (face 84:10 p (ref 84:12 hair))
199 (face 84:10 p (ref 84:12 hair))
202− (face 84:17 q (ref 84:19 tape))))
200+ (face 84:17 q
203− (mold 86:1 edge
204− (cell 86:9
205− (face 86:10 p (ref 86:12 hair))
206− (face 86:17 q
207− (apply 86:19 unit
201+ (apply 84:19 unit
208− (cell 86:25
202+ (cell 84:25
209− (face 86:26 p (noun 86:28))
203+ (face 84:26 p (noun 84:28))
210− (face 86:30 q (ref 86:32 nail)))))))
204+ (face 84:30 q (ref 84:32 nail)))))))
211− (mold 88:1 rule
205+ (mold 86:1 rule
212− (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
206+ (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
213− (mold 90:1 spot
207+ (mold 88:1 spot
214− (cell 90:9
208+ (cell 88:9
215− (face 90:10 p (ref 90:12 path))
209+ (face 88:10 p (ref 88:12 path))
216− (face 90:17 q (ref 90:19 pint))))
210+ (face 88:17 q (ref 88:19 pint))))
217− (mold 92:1 toon
211+ (mold 90:1 toon
218− (union 93:3
212+ (union 91:3
213+ (cell 91:3
214+ (const 91:4 %0)
215+ (face 91:7 p (noun 91:9)))
216+ (cell 92:3
217+ (const 92:4 %1)
218+ (face 92:7 p (noun 92:9)))
219 (cell 93:3
219 (cell 93:3
220− (const 93:4 %0)
220+ (const 93:4 %2)
221− (face 93:7 p (noun 93:9)))
222− (cell 94:3
223− (const 94:4 %1)
224− (face 94:7 p (noun 94:9)))
225− (cell 95:3
226− (const 95:4 %2)
227− (face 95:7 p
221+ (face 93:7 p
228− (apply 95:9 list (ref 95:15 tank)))))))
222+ (apply 93:9 list (ref 93:15 tank)))))))
tests/golden/prelude-list-helpers/source.jibb+6−16
@@ -37,18 +37,16 @@
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)
41− ?- xs
40+ ?- xs
42− ~ ys
41+ ~ ys
43− [item rest] [item (weld rest ys)]
42+ [item rest] [item (weld rest ys)]
44
43
45++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
46 ?- args
45 ?- args
47 [xs f]
46 [xs f]
48− ^- (list B)
49− ?- xs
47+ ?- xs
50− ~ ~
48+ ~ ~
51− [item rest] [(f item) (turn rest f)]
49+ [item rest] [(f item) (turn rest f)]
52
50
53+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
54
52
@@ -96,14 +94,6 @@
96
94
97+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
95+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
98
96
99−++ like |= [f=$-(A B) result=(like A)]
100− ++ mapped
101− ^- (unit [p=B q=nail])
102− ?- q.result
103− ~ ~
104− [~ value] `[p=(f p.value) q=q.value]
105− ^- (like B) [p=p.result q=mapped]
106−
107++ wonk |= veq=(like A)
97++ wonk |= veq=(like A)
108 ?- q.veq
98 ?- q.veq
109 ~ !!
99 ~ !!
tests/golden/prelude-list-helpers/tokens.txt+563−652
@@ -190,739 +190,650 @@
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 glyph (
194+40:10 name xs
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
19841:9 INDENT
19541:9 INDENT
199−41:9 glyph ?-
200−41:12 name xs
201−42:11 INDENT
202−42:11 lit ~
196+41:9 lit ~
203−42:13 name ys
197+41:11 name ys
204−43:11 NEWLINE
198+42:9 NEWLINE
205−43:11 glyph [
199+42:9 glyph [
206−43:12 tight name item
200+42:10 tight name item
207−43:17 name rest
201+42:15 name rest
208−43:21 tight glyph ]
202+42:19 tight glyph ]
209−43:23 glyph [
203+42:21 glyph [
210−43:24 tight name item
204+42:22 tight name item
211−43:29 glyph (
205+42:27 glyph (
212−43:30 tight name weld
206+42:28 tight name weld
213−43:35 name rest
207+42:33 name rest
214−43:40 name ys
208+42:38 name ys
215−43:42 tight glyph )
209+42:40 tight glyph )
216−43:43 tight glyph ]
210+42:41 tight glyph ]
217−45:1 DEDENT
211+44:1 DEDENT
218−45:1 DEDENT
219−45:1 DEDENT
212+44:1 DEDENT
220−45:1 DEDENT
213+44:1 DEDENT
221−45:1 DEDENT
214+44:1 DEDENT
222−45:1 NEWLINE
215+44:1 NEWLINE
223−45:1 glyph ++
216+44:1 glyph ++
224−45:4 name turn
217+44:4 name turn
225−45:9 glyph |=
218+44:9 glyph |=
226−45:12 name args
219+44:12 name args
227−45:16 tight glyph =
220+44:16 tight glyph =
228−45:17 tight glyph [
221+44:17 tight glyph [
229−45:18 tight glyph (
222+44:18 tight glyph (
230−45:19 tight name list
223+44:19 tight name list
231−45:24 tvar A
224+44:24 tvar A
232−45:25 tight glyph )
225+44:25 tight glyph )
233−45:27 glyph $-(
226+44:27 glyph $-(
234−45:30 tight tvar A
227+44:30 tight tvar A
235−45:32 tvar B
228+44:32 tvar B
236−45:33 tight glyph )
229+44:33 tight glyph )
237−45:34 tight glyph ]
230+44:34 tight glyph ]
238−46:3 INDENT
231+45:3 INDENT
239−46:3 glyph ?-
232+45:3 glyph ?-
240−46:6 name args
233+45:6 name args
241−47:5 INDENT
234+46:5 INDENT
242−47:5 glyph [
235+46:5 glyph [
243−47:6 tight name xs
236+46:6 tight name xs
244−47:9 name f
237+46:9 name f
245−47:10 tight glyph ]
238+46:10 tight glyph ]
246−48:7 INDENT
239+47:7 INDENT
247−48:7 glyph ^-
240+47:7 glyph ?-
248−48:10 glyph (
241+47:10 name xs
249−48:11 tight name list
250−48:16 tvar B
251−48:17 tight glyph )
252−49:9 INDENT
242+48:9 INDENT
253−49:9 glyph ?-
254−49:12 name xs
255−50:11 INDENT
256−50:11 lit ~
243+48:9 lit ~
257−50:13 lit ~
244+48:11 lit ~
258−51:11 NEWLINE
245+49:9 NEWLINE
259−51:11 glyph [
246+49:9 glyph [
260−51:12 tight name item
247+49:10 tight name item
261−51:17 name rest
248+49:15 name rest
262−51:21 tight glyph ]
249+49:19 tight glyph ]
263−51:23 glyph [
250+49:21 glyph [
264−51:24 tight glyph (
251+49:22 tight glyph (
265−51:25 tight name f
252+49:23 tight name f
266−51:27 name item
253+49:25 name item
254+49:29 tight glyph )
267−51:31 tight glyph )
255+49:31 glyph (
268−51:33 glyph (
269−51:34 tight name turn
256+49:32 tight name turn
270−51:39 name rest
257+49:37 name rest
271−51:44 name f
258+49:42 name f
272−51:45 tight glyph )
259+49:43 tight glyph )
273−51:46 tight glyph ]
260+49:44 tight glyph ]
274−53:1 DEDENT
261+51:1 DEDENT
275−53:1 DEDENT
262+51:1 DEDENT
276−53:1 DEDENT
263+51:1 DEDENT
277−53:1 DEDENT
264+51:1 DEDENT
278−53:1 DEDENT
265+51:1 NEWLINE
266+51:1 glyph +$
267+51:4 name dime
268+51:9 glyph [
269+51:10 tight name p
270+51:11 tight glyph =
271+51:12 tight aura @ta
272+51:16 name q
273+51:17 tight glyph =
274+51:18 tight aura @
275+51:19 tight glyph ]
27953:1 NEWLINE
27653:1 NEWLINE
28053:1 glyph +$
27753:1 glyph +$
281−53:4 name dime
278+53:4 name hair
28253:9 glyph [
27953:9 glyph [
28353:10 tight name p
28053:10 tight name p
28453:11 tight glyph =
28153:11 tight glyph =
285−53:12 tight aura @ta
282+53:12 tight aura @ud
28653:16 name q
28353:16 name q
28753:17 tight glyph =
28453:17 tight glyph =
288−53:18 tight aura @
285+53:18 tight aura @ud
289−53:19 tight glyph ]
286+53:21 tight glyph ]
29055:1 NEWLINE
28755:1 NEWLINE
29155:1 glyph +$
28855:1 glyph +$
292−55:4 name hair
289+55:4 name pint
29355:9 glyph [
29055:9 glyph [
29455:10 tight name p
29155:10 tight name p
29555:11 tight glyph =
29255:11 tight glyph =
296−55:12 tight aura @ud
293+55:12 tight glyph [
297−55:16 name q
294+55:13 tight name p
298−55:17 tight glyph =
295+55:14 tight glyph =
296+55:15 tight aura @
297+55:17 name q
299−55:18 tight aura @ud
298+55:18 tight glyph =
299+55:19 tight aura @
300+55:20 tight glyph ]
301+55:22 name q
302+55:23 tight glyph =
303+55:24 tight glyph [
304+55:25 tight name p
305+55:26 tight glyph =
306+55:27 tight aura @
307+55:29 name q
308+55:30 tight glyph =
309+55:31 tight aura @
310+55:32 tight glyph ]
300−55:21 tight glyph ]
311+55:33 tight glyph ]
30157:1 NEWLINE
31257:1 NEWLINE
30257:1 glyph +$
31357:1 glyph +$
303−57:4 name pint
314+57:4 name coin
315+58:3 INDENT
316+58:3 glyph [
317+58:4 tight lit %$
318+58:7 name p
319+58:8 tight glyph =
320+58:9 tight name dime
304−57:9 glyph [
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
305−57:10 tight name p
325+59:10 name p
306−57:11 tight glyph =
326+59:11 tight glyph =
307−57:12 tight glyph [
327+59:12 tight glyph *
308−57:13 tight name p
328+59:13 tight glyph ]
309−57:14 tight glyph =
329+60:3 NEWLINE
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 %$
331+60:4 tight lit %many
332−60:7 name p
333−60:8 tight glyph =
334−60:9 tight name dime
335−60:13 tight glyph ]
336−61:3 NEWLINE
337−61:3 glyph [
338−61:4 tight lit %blob
339−61:10 name p
340−61:11 tight glyph =
341−61:12 tight glyph *
342−61:13 tight glyph ]
343−62:3 NEWLINE
344−62:3 glyph [
345−62:4 tight lit %many
346−62:10 name p
332+60:10 name p
347−62:11 tight glyph =
333+60:11 tight glyph =
348−62:12 tight glyph (
334+60:12 tight glyph (
349−62:13 tight name list
335+60:13 tight name list
350−62:18 name coin
336+60:18 name coin
351−62:22 tight glyph )
337+60:22 tight glyph )
352−62:23 tight glyph ]
338+60:23 tight glyph ]
353−64:1 DEDENT
339+62:1 DEDENT
340+62:1 NEWLINE
341+62:1 glyph +$
342+62:4 name pair
343+62:9 glyph |$
344+62:12 glyph [
345+62:13 tight tvar A
346+62:15 tvar B
347+62:16 tight glyph ]
348+62:18 glyph [
349+62:19 tight name p
350+62:20 tight glyph =
351+62:21 tight tvar A
352+62:23 name q
353+62:24 tight glyph =
354+62:25 tight tvar B
355+62:26 tight glyph ]
35464:1 NEWLINE
35664:1 NEWLINE
35564:1 glyph +$
35764:1 glyph +$
356−64:4 name pair
358+64:4 name trel
35764:9 glyph |$
35964:9 glyph |$
35864:12 glyph [
36064:12 glyph [
35964:13 tight tvar A
36164:13 tight tvar A
36064:15 tvar B
36264:15 tvar B
361−64:16 tight glyph ]
363+64:17 tvar C
364+64:18 tight glyph ]
362−64:18 glyph [
365+64:20 glyph [
363−64:19 tight name p
364−64:20 tight glyph =
365−64:21 tight tvar A
366+64:21 tight name p
366−64:23 name q
367+64:22 tight glyph =
367−64:24 tight glyph =
368+64:23 tight tvar A
369+64:25 name q
370+64:26 tight glyph =
368−64:25 tight tvar B
371+64:27 tight tvar B
372+64:29 name r
373+64:30 tight glyph =
374+64:31 tight tvar C
369−64:26 tight glyph ]
375+64:32 tight glyph ]
37066:1 NEWLINE
37666:1 NEWLINE
37166:1 glyph +$
37766:1 glyph +$
372−66:4 name trel
378+66:4 name qual
37366:9 glyph |$
37966:9 glyph |$
37466:12 glyph [
38066:12 glyph [
37566:13 tight tvar A
38166:13 tight tvar A
37666:15 tvar B
38266:15 tvar B
37766:17 tvar C
38366:17 tvar C
378−66:18 tight glyph ]
384+66:19 tvar D
385+66:20 tight glyph ]
379−66:20 glyph [
386+66:22 glyph [
380−66:21 tight name p
387+66:23 tight name p
381−66:22 tight glyph =
388+66:24 tight glyph =
382−66:23 tight tvar A
389+66:25 tight tvar A
383−66:25 name q
390+66:27 name q
384−66:26 tight glyph =
391+66:28 tight glyph =
385−66:27 tight tvar B
392+66:29 tight tvar B
386−66:29 name r
393+66:31 name r
387−66:30 tight glyph =
388−66:31 tight tvar C
389−66:32 tight glyph ]
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 ]
39068:1 NEWLINE
40068:1 NEWLINE
39168:1 glyph +$
40168:1 glyph +$
392−68:4 name qual
402+68:4 name cord
393−68:9 glyph |$
403+68:9 aura @t
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 ]
41470:1 NEWLINE
40470:1 NEWLINE
41570:1 glyph +$
40570:1 glyph +$
416−70:4 name cord
406+70:4 name knot
417−70:9 aura @t
407+70:9 aura @ta
41872:1 NEWLINE
40872:1 NEWLINE
41972:1 glyph +$
40972:1 glyph +$
420−72:4 name knot
410+72:4 name tape
411+72:9 glyph (
412+72:10 tight name list
421−72:9 aura @ta
413+72:15 aura @tD
414+72:18 tight glyph )
42274:1 NEWLINE
41574:1 NEWLINE
42374:1 glyph +$
41674:1 glyph +$
424−74:4 name tape
417+74:4 name path
42574:9 glyph (
41874:9 glyph (
42674:10 tight name list
41974:10 tight name list
427−74:15 aura @tD
420+74:15 name knot
428−74:18 tight glyph )
421+74:19 tight glyph )
42976:1 NEWLINE
42276:1 NEWLINE
43076:1 glyph +$
42376:1 glyph +$
431−76:4 name path
424+76:4 name tank
432−76:9 glyph (
433−76:10 tight name list
434−76:15 name knot
435−76:19 tight glyph )
436−78:1 NEWLINE
437−78:1 glyph +$
438−78:4 name tank
439−79:3 INDENT
425+77:3 INDENT
440−79:3 name cord
426+77:3 name cord
427+78:3 NEWLINE
428+78:3 glyph [
429+78:4 tight lit %leaf
430+78:10 name p
431+78:11 tight glyph =
432+78:12 tight name tape
433+78:16 tight glyph ]
434+79:3 NEWLINE
435+79:3 glyph [
436+79:4 tight lit %palm
437+79:10 name p
438+79:11 tight glyph =
439+79:12 tight glyph (
440+79:13 tight name qual
441+79:18 name tape
442+79:23 name tape
443+79:28 name tape
444+79:33 name tape
445+79:37 tight glyph )
446+79:39 name q
447+79:40 tight glyph =
448+79:41 tight glyph (
449+79:42 tight name list
450+79:47 name tank
451+79:51 tight glyph )
452+79:52 tight glyph ]
44180:3 NEWLINE
45380:3 NEWLINE
44280:3 glyph [
45480:3 glyph [
443−80:4 tight lit %leaf
455+80:4 tight lit %rose
44480:10 name p
45680:10 name p
44580:11 tight glyph =
45780:11 tight glyph =
446−80:12 tight name tape
458+80:12 tight glyph (
447−80:16 tight glyph ]
448−81:3 NEWLINE
449−81:3 glyph [
450−81:4 tight lit %palm
451−81:10 name p
452−81:11 tight glyph =
453−81:12 tight glyph (
454−81:13 tight name qual
459+80:13 tight name trel
455−81:18 name tape
460+80:18 name tape
456−81:23 name tape
461+80:23 name tape
457−81:28 name tape
462+80:28 name tape
458−81:33 name tape
463+80:32 tight glyph )
464+80:34 name q
465+80:35 tight glyph =
466+80:36 tight glyph (
459−81:37 tight glyph )
467+80:37 tight name list
460−81:39 name q
468+80:42 name tank
461−81:40 tight glyph =
469+80:46 tight glyph )
462−81:41 tight glyph (
463−81:42 tight name list
464−81:47 name tank
465−81:51 tight glyph )
470+80:47 tight glyph ]
466−81:52 tight glyph ]
471+82:1 DEDENT
467−82:3 NEWLINE
472+82:1 NEWLINE
468−82:3 glyph [
473+82:1 glyph +$
469−82:4 tight lit %rose
474+82:4 name nail
475+82:9 glyph [
470−82:10 name p
476+82:10 tight name p
47182:11 tight glyph =
47782:11 tight glyph =
472−82:12 tight glyph (
478+82:12 tight name hair
473−82:13 tight name trel
479+82:17 name q
480+82:18 tight glyph =
474−82:18 name tape
481+82:19 tight name tape
475−82:23 name tape
476−82:28 name tape
477−82:32 tight glyph )
478−82:34 name q
479−82:35 tight glyph =
480−82:36 tight glyph (
481−82:37 tight name list
482−82:42 name tank
483−82:46 tight glyph )
484−82:47 tight glyph ]
482+82:23 tight glyph ]
485−84:1 DEDENT
48684:1 NEWLINE
48384:1 NEWLINE
48784:1 glyph +$
48484:1 glyph +$
488−84:4 name nail
485+84:4 name edge
48984:9 glyph [
48684:9 glyph [
49084:10 tight name p
48784:10 tight name p
49184:11 tight glyph =
48884:11 tight glyph =
49284:12 tight name hair
48984:12 tight name hair
49384:17 name q
49084:17 name q
49484:18 tight glyph =
49184:18 tight glyph =
495−84:19 tight name tape
492+84:19 tight glyph (
493+84:20 tight name unit
494+84:25 glyph [
495+84:26 tight name p
496+84:27 tight glyph =
497+84:28 tight glyph *
498+84:30 name q
499+84:31 tight glyph =
500+84:32 tight name nail
501+84:36 tight glyph ]
502+84:37 tight glyph )
496−84:23 tight glyph ]
503+84:38 tight glyph ]
49786:1 NEWLINE
50486:1 NEWLINE
49886:1 glyph +$
50586:1 glyph +$
499−86:4 name edge
506+86:4 name rule
500−86:9 glyph [
507+86:9 glyph $-(
501−86:10 tight name p
502−86:11 tight glyph =
503−86:12 tight name hair
508+86:12 tight name nail
504−86:17 name q
509+86:17 name edge
505−86:18 tight glyph =
506−86:19 tight glyph (
507−86:20 tight name unit
508−86:25 glyph [
509−86:26 tight name p
510−86:27 tight glyph =
511−86:28 tight glyph *
512−86:30 name q
513−86:31 tight glyph =
514−86:32 tight name nail
515−86:36 tight glyph ]
516−86:37 tight glyph )
510+86:21 tight glyph )
517−86:38 tight glyph ]
51888:1 NEWLINE
51188:1 NEWLINE
51988:1 glyph +$
51288:1 glyph +$
520−88:4 name rule
513+88:4 name spot
521−88:9 glyph $-(
514+88:9 glyph [
515+88:10 tight name p
516+88:11 tight glyph =
522−88:12 tight name nail
517+88:12 tight name path
523−88:17 name edge
518+88:17 name q
519+88:18 tight glyph =
520+88:19 tight name pint
524−88:21 tight glyph )
521+88:23 tight glyph ]
52590:1 NEWLINE
52290:1 NEWLINE
52690:1 glyph +$
52390:1 glyph +$
527−90:4 name spot
524+90:4 name toon
528−90:9 glyph [
525+91:3 INDENT
529−90:10 tight name p
526+91:3 glyph [
530−90:11 tight glyph =
527+91:4 tight lit %0
531−90:12 tight name path
528+91:7 name p
532−90:17 name q
529+91:8 tight glyph =
533−90:18 tight glyph =
530+91:9 tight glyph *
534−90:19 tight name pint
531+91:10 tight glyph ]
535−90:23 tight glyph ]
532+92:3 NEWLINE
536−92:1 NEWLINE
533+92:3 glyph [
537−92:1 glyph +$
534+92:4 tight lit %1
538−92:4 name toon
535+92:7 name p
539−93:3 INDENT
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 %0
541+93:4 tight lit %2
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 (
559−95:10 tight name list
545+93:10 tight name list
560−95:15 name tank
546+93:15 name tank
561−95:19 tight glyph )
547+93:19 tight glyph )
562−95:20 tight glyph ]
548+93:20 tight glyph ]
563−97:1 DEDENT
549+95:1 DEDENT
550+95:1 NEWLINE
551+95:1 glyph +$
552+95:4 name like
553+95:9 glyph |$
554+95:12 glyph [
555+95:13 tight tvar A
556+95:14 tight glyph ]
557+95:16 glyph [
558+95:17 tight name p
559+95:18 tight glyph =
560+95:19 tight name hair
561+95:24 name q
562+95:25 tight glyph =
563+95:26 tight glyph (
564+95:27 tight name unit
565+95:32 glyph [
566+95:33 tight name p
567+95:34 tight glyph =
568+95:35 tight tvar A
569+95:37 name q
570+95:38 tight glyph =
571+95:39 tight name nail
572+95:43 tight glyph ]
573+95:44 tight glyph )
574+95:45 tight glyph ]
56497:1 NEWLINE
57597:1 NEWLINE
565−97:1 glyph +$
576+97:1 glyph ++
566−97:4 name like
577+97:4 name wonk
567−97:9 glyph |$
568−97:12 glyph [
569−97:13 tight tvar A
570−97:14 tight glyph ]
571−97:16 glyph [
572−97:17 tight name p
573−97:18 tight glyph =
574−97:19 tight name hair
575−97:24 name q
576−97:25 tight glyph =
577−97:26 tight glyph (
578−97:27 tight name unit
579−97:32 glyph [
580−97:33 tight name p
581−97:34 tight glyph =
582−97:35 tight tvar A
583−97:37 name q
584−97:38 tight glyph =
585−97:39 tight name nail
586−97:43 tight glyph ]
587−97:44 tight glyph )
588−97:45 tight glyph ]
589−99:1 NEWLINE
590−99:1 glyph ++
591−99:4 name like
592−99:9 glyph |=
578+97:9 glyph |=
593−99:12 glyph [
579+97:12 name veq
594−99:13 tight name f
595−99:14 tight glyph =
580+97:15 tight glyph =
596−99:15 tight glyph $-(
581+97:16 tight glyph (
597−99:18 tight tvar A
582+97:17 tight name like
598−99:20 tvar B
583+97:22 tvar A
599−99:21 tight glyph )
600−99:23 name result
601−99:29 tight glyph =
584+97:23 tight glyph )
585+98:3 INDENT
602−99:30 tight glyph (
586+98:3 glyph ?-
603−99:31 tight name like
587+98:6 wing q.veq
604−99:36 tvar A
588+99:5 INDENT
605−99:37 tight glyph )
589+99:5 lit ~
606−99:38 tight glyph ]
590+99:7 glyph !!
607−100:3 INDENT
591+100:5 NEWLINE
608−100:3 glyph ++
592+100:5 glyph [
609−100:6 name mapped
593+100:6 tight lit ~
610−101:5 INDENT
594+100:8 name product
611−101:5 glyph ^-
595+100:15 tight glyph ]
612−101:8 glyph (
596+100:17 wing p.product
613−101:9 tight name unit
597+102:1 DEDENT
614−101:14 glyph [
598+102:1 DEDENT
615−101:15 tight name p
599+102:1 NEWLINE
616−101:16 tight glyph =
600+102:1 glyph +$
617−101:17 tight tvar B
601+102:4 name lone
618−101:19 name q
602+102:9 glyph |$
619−101:20 tight glyph =
603+102:12 glyph [
620−101:21 tight name nail
604+102:13 tight tvar A
621−101:25 tight glyph ]
605+102:14 tight glyph ]
622−101:26 tight glyph )
606+102:16 glyph [
623−102:7 INDENT
607+102:17 tight name p
624−102:7 glyph ?-
608+102:18 tight glyph =
625−102:10 wing q.result
609+102:19 tight tvar A
626−103:9 INDENT
610+102:20 tight glyph ]
627−103:9 lit ~
611+104:1 NEWLINE
628−103:11 lit ~
612+104:1 glyph +$
613+104:4 name lest
629−104:9 NEWLINE
614+104:9 glyph |$
630−104:9 glyph [
615+104:12 glyph [
631−104:10 tight lit ~
616+104:13 tight tvar A
632−104:12 name value
617+104:14 tight glyph ]
618+104:16 glyph [
633−104:17 tight glyph ]
619+104:17 tight name i
634−104:19 glyph `
620+104:18 tight glyph =
635−104:20 tight glyph [
621+104:19 tight tvar A
636−104:21 tight name p
622+104:21 name t
637104:22 tight glyph =
623104:22 tight glyph =
638104:23 tight glyph (
624104:23 tight glyph (
639−104:24 tight name f
625+104:24 tight name list
640−104:26 wing p.value
626+104:29 tvar A
641−104:33 tight glyph )
627+104:30 tight glyph )
642−104:35 name q
628+104:31 tight glyph ]
629+106:1 NEWLINE
630+106:1 glyph +$
631+106:4 name pole
632+106:9 glyph |$
643−104:36 tight glyph =
633+106:12 glyph [
644−104:37 tight wing q.value
634+106:13 tight tvar A
645−104:44 tight glyph ]
635+106:14 tight glyph ]
646−105:3 DEDENT
636+107:3 INDENT
647−105:3 DEDENT
637+107:3 lit ~
648−105:3 DEDENT
638+108:3 NEWLINE
649−105:3 NEWLINE
639+108:3 glyph [
650−105:3 glyph ^-
640+108:4 tight tvar A
651−105:6 glyph (
641+108:6 glyph (
652−105:7 tight name like
642+108:7 tight name pole
653−105:12 tvar B
643+108:12 tvar A
654−105:13 tight glyph )
644+108:13 tight glyph )
645+108:14 tight glyph ]
646+110:1 DEDENT
647+110:1 NEWLINE
648+110:1 glyph +$
649+110:4 name quip
650+110:9 glyph |$
655−105:15 glyph [
651+110:12 glyph [
656−105:16 tight name p
652+110:13 tight tvar A
653+110:15 tvar B
657−105:17 tight glyph =
654+110:16 tight glyph ]
658−105:18 tight wing p.result
655+110:18 glyph [
659−105:27 name q
656+110:19 tight glyph (
660−105:28 tight glyph =
657+110:20 tight name list
661−105:29 tight name mapped
658+110:25 tvar A
662−105:35 tight glyph ]
659+110:26 tight glyph )
663−107:1 DEDENT
664−107:1 NEWLINE
665−107:1 glyph ++
666−107:4 name wonk
667−107:9 glyph |=
668−107:12 name veq
669−107:15 tight glyph =
670−107:16 tight glyph (
671−107:17 tight name like
672−107:22 tvar A
660+110:28 tvar B
673−107:23 tight glyph )
674−108:3 INDENT
675−108:3 glyph ?-
676−108:6 wing q.veq
677−109:5 INDENT
678−109:5 lit ~
679−109:7 glyph !!
680−110:5 NEWLINE
681−110:5 glyph [
682−110:6 tight lit ~
683−110:8 name product
684−110:15 tight glyph ]
661+110:29 tight glyph ]
685−110:17 wing p.product
686−112:1 DEDENT
687−112:1 DEDENT
688112:1 NEWLINE
662112:1 NEWLINE
689112:1 glyph +$
663112:1 glyph +$
690−112:4 name lone
664+112:4 name tree
691112:9 glyph |$
665112:9 glyph |$
692112:12 glyph [
666112:12 glyph [
693112:13 tight tvar A
667112:13 tight tvar A
694112:14 tight glyph ]
668112:14 tight glyph ]
695−112:16 glyph [
669+113:3 INDENT
696−112:17 tight name p
670+113:3 lit ~
697−112:18 tight glyph =
671+114:3 NEWLINE
698−112:19 tight tvar A
672+114:3 glyph [
699−112:20 tight glyph ]
673+114:4 tight name n
700−114:1 NEWLINE
674+114:5 tight glyph =
701−114:1 glyph +$
675+114:6 tight tvar A
702−114:4 name lest
676+114:8 name l
703−114:9 glyph |$
677+114:9 tight glyph =
704−114:12 glyph [
678+114:10 tight glyph (
705−114:13 tight tvar A
679+114:11 tight name tree
706−114:14 tight glyph ]
680+114:16 tvar A
707−114:16 glyph [
681+114:17 tight glyph )
708−114:17 tight name i
682+114:19 name r
709−114:18 tight glyph =
683+114:20 tight glyph =
710−114:19 tight tvar A
684+114:21 tight glyph (
711−114:21 name t
685+114:22 tight name tree
712−114:22 tight glyph =
686+114:27 tvar A
713−114:23 tight glyph (
687+114:28 tight glyph )
714−114:24 tight name list
688+114:29 tight glyph ]
715−114:29 tvar A
689+116:1 DEDENT
716−114:30 tight glyph )
717−114:31 tight glyph ]
718116:1 NEWLINE
690116:1 NEWLINE
719116:1 glyph +$
691116:1 glyph +$
720−116:4 name pole
692+116:4 name each
721116:9 glyph |$
693116:9 glyph |$
722116:12 glyph [
694116:12 glyph [
723116:13 tight tvar A
695116:13 tight tvar A
724−116:14 tight glyph ]
696+116:15 tvar B
697+116:16 tight glyph ]
725117:3 INDENT
698117:3 INDENT
726−117:3 lit ~
699+117:3 glyph [
700+117:4 tight lit %|
701+117:7 name p
702+117:8 tight glyph =
703+117:9 tight tvar B
704+117:10 tight glyph ]
727118:3 NEWLINE
705118:3 NEWLINE
728118:3 glyph [
706118:3 glyph [
729−118:4 tight tvar A
707+118:4 tight lit %&
730−118:6 glyph (
708+118:7 name p
731−118:7 tight name pole
709+118:8 tight glyph =
732−118:12 tvar A
710+118:9 tight tvar A
733−118:13 tight glyph )
711+118:10 tight glyph ]
734−118:14 tight glyph ]
735120:1 DEDENT
712120:1 DEDENT
736120:1 NEWLINE
713120:1 NEWLINE
737120:1 glyph +$
714120:1 glyph +$
738−120:4 name quip
715+120:4 name bloq
739−120:9 glyph |$
716+120:9 aura @
740−120:12 glyph [
741−120:13 tight tvar A
742−120:15 tvar B
743−120:16 tight glyph ]
744−120:18 glyph [
745−120:19 tight glyph (
746−120:20 tight name list
747−120:25 tvar A
748−120:26 tight glyph )
749−120:28 tvar B
750−120:29 tight glyph ]
751122:1 NEWLINE
717122:1 NEWLINE
752−122:1 glyph +$
718+122:1 glyph ++
753−122:4 name tree
719+122:4 name some
754−122:9 glyph |$
720+122:9 glyph |=
755−122:12 glyph [
721+122:12 name item
756−122:13 tight tvar A
722+122:16 tight glyph =
757−122:14 tight glyph ]
723+122:17 tight tvar A
758−123:3 INDENT
724+122:19 glyph `
759−123:3 lit ~
725+122:20 tight name item
760−124:3 NEWLINE
726+124:1 NEWLINE
761−124:3 glyph [
727+124:1 glyph ++
762−124:4 tight name n
728+124:4 name lure
763−124:5 tight glyph =
729+124:9 glyph |=
764−124:6 tight tvar A
730+124:12 name item
765−124:8 name l
731+124:16 tight glyph =
766−124:9 tight glyph =
732+124:17 tight tvar A
767−124:10 tight glyph (
733+125:3 INDENT
768−124:11 tight name tree
734+125:3 glyph ^-
769−124:16 tvar A
735+125:6 glyph (
770−124:17 tight glyph )
736+125:7 tight name list
771−124:19 name r
737+125:12 tvar A
772−124:20 tight glyph =
738+125:13 tight glyph )
773−124:21 tight glyph (
739+125:15 glyph [
774−124:22 tight name tree
740+125:16 tight name item
775−124:27 tvar A
741+125:21 lit ~
776−124:28 tight glyph )
742+125:22 tight glyph ]
777−124:29 tight glyph ]
743+127:1 DEDENT
778−126:1 DEDENT
744+127:1 NEWLINE
779−126:1 NEWLINE
745+127:1 glyph ++
780−126:1 glyph +$
746+127:4 name snoc
781−126:4 name each
747+127:9 glyph |=
782−126:9 glyph |$
748+127:12 name args
783−126:12 glyph [
749+127:16 tight glyph =
784−126:13 tight tvar A
750+127:17 tight glyph [
785−126:15 tvar B
751+127:18 tight glyph (
786−126:16 tight glyph ]
752+127:19 tight name list
787−127:3 INDENT
753+127:24 tvar A
788−127:3 glyph [
754+127:25 tight glyph )
789−127:4 tight lit %|
755+127:27 tvar A
790−127:7 name p
756+127:28 tight glyph ]
791−127:8 tight glyph =
757+128:3 INDENT
792−127:9 tight tvar B
758+128:3 glyph ?-
793−127:10 tight glyph ]
759+128:6 name args
794−128:3 NEWLINE
760+129:5 INDENT
795−128:3 glyph [
761+129:5 glyph [
796−128:4 tight lit %&
762+129:6 tight name xs
797−128:7 name p
763+129:9 name item
798−128:8 tight glyph =
764+129:13 tight glyph ]
799−128:9 tight tvar A
765+129:15 glyph (
800−128:10 tight glyph ]
766+129:16 tight name weld
801−130:1 DEDENT
767+129:21 name xs
802−130:1 NEWLINE
768+129:24 glyph [
803−130:1 glyph +$
769+129:25 tight name item
804−130:4 name bloq
770+129:30 lit ~
805−130:9 aura @
771+129:31 tight glyph ]
806−132:1 NEWLINE
772+129:32 tight glyph )
807−132:1 glyph ++
773+131:1 DEDENT
808−132:4 name some
774+131:1 DEDENT
809−132:9 glyph |=
775+131:1 NEWLINE
810−132:12 name item
776+131:1 glyph ++
811−132:16 tight glyph =
777+131:4 name flop
812−132:17 tight tvar A
778+131:9 glyph |=
813−132:19 glyph `
779+131:12 name xs
814−132:20 tight name item
780+131:14 tight glyph =
815−134:1 NEWLINE
781+131:15 tight glyph (
816−134:1 glyph ++
782+131:16 tight name list
817−134:4 name lure
783+131:21 tvar A
818−134:9 glyph |=
784+131:22 tight glyph )
819−134:12 name item
785+132:3 INDENT
820−134:16 tight glyph =
786+132:3 glyph ++
821−134:17 tight tvar A
787+132:6 name reverse-into
822−135:3 INDENT
788+132:19 glyph |=
823−135:3 glyph ^-
789+132:22 name args
824−135:6 glyph (
790+132:26 tight glyph =
825−135:7 tight name list
791+132:27 tight glyph [
826−135:12 tvar A
792+132:28 tight glyph (
827−135:13 tight glyph )
793+132:29 tight name list
828−135:15 glyph [
794+132:34 tvar A
829−135:16 tight name item
795+132:35 tight glyph )
830−135:21 lit ~
796+132:37 glyph (
831−135:22 tight glyph ]
797+132:38 tight name list
832−137:1 DEDENT
798+132:43 tvar A
833−137:1 NEWLINE
799+132:44 tight glyph )
834−137:1 glyph ++
800+132:45 tight glyph ]
835−137:4 name snoc
801+133:5 INDENT
836−137:9 glyph |=
802+133:5 glyph ?-
837−137:12 name args
803+133:8 name args
838−137:16 tight glyph =
804+134:7 INDENT
839−137:17 tight glyph [
805+134:7 glyph [
840−137:18 tight glyph (
806+134:8 tight name rest
841−137:19 tight name list
807+134:13 name acc
842−137:24 tvar A
808+134:16 tight glyph ]
843−137:25 tight glyph )
809+135:9 INDENT
844−137:27 tvar A
810+135:9 glyph ?-
845−137:28 tight glyph ]
811+135:12 name rest
846−138:3 INDENT
812+136:11 INDENT
847−138:3 glyph ?-
813+136:11 lit ~
848−138:6 name args
814+136:13 name acc
849−139:5 INDENT
815+137:11 NEWLINE
850−139:5 glyph [
816+137:11 glyph [
851−139:6 tight name xs
817+137:12 tight name item
852−139:9 name item
818+137:17 name more
853−139:13 tight glyph ]
819+137:21 tight glyph ]
854−139:15 glyph (
820+137:23 glyph (
855−139:16 tight name weld
821+137:24 tight name reverse-into
856−139:21 name xs
822+137:37 name more
857−139:24 glyph [
823+137:42 glyph [
858−139:25 tight name item
824+137:43 tight name item
859−139:30 lit ~
825+137:48 name acc
860−139:31 tight glyph ]
826+137:51 tight glyph ]
861−139:32 tight glyph )
827+137:52 tight glyph )
862−141:1 DEDENT
828+138:3 DEDENT
863−141:1 DEDENT
829+138:3 DEDENT
864−141:1 NEWLINE
830+138:3 DEDENT
865−141:1 glyph ++
831+138:3 DEDENT
866−141:4 name flop
832+138:3 NEWLINE
867−141:9 glyph |=
833+138:3 glyph (
868−141:12 name xs
834+138:4 tight name reverse-into
869−141:14 tight glyph =
835+138:17 name xs
870−141:15 tight glyph (
836+138:20 lit ~
871−141:16 tight name list
837+138:21 tight glyph )
872−141:21 tvar A
838+138:22 DEDENT
873−141:22 tight glyph )
839+138:22 NEWLINE
874−142:3 INDENT
875−142:3 glyph ++
876−142:6 name reverse-into
877−142:19 glyph |=
878−142:22 name args
879−142:26 tight glyph =
880−142:27 tight glyph [
881−142:28 tight glyph (
882−142:29 tight name list
883−142:34 tvar A
884−142:35 tight glyph )
885−142:37 glyph (
886−142:38 tight name list
887−142:43 tvar A
888−142:44 tight glyph )
889−142:45 tight glyph ]
890−143:5 INDENT
891−143:5 glyph ?-
892−143:8 name args
893−144:7 INDENT
894−144:7 glyph [
895−144:8 tight name rest
896−144:13 name acc
897−144:16 tight glyph ]
898−145:9 INDENT
899−145:9 glyph ?-
900−145:12 name rest
901−146:11 INDENT
902−146:11 lit ~
903−146:13 name acc
904−147:11 NEWLINE
905−147:11 glyph [
906−147:12 tight name item
907−147:17 name more
908−147:21 tight glyph ]
909−147:23 glyph (
910−147:24 tight name reverse-into
911−147:37 name more
912−147:42 glyph [
913−147:43 tight name item
914−147:48 name acc
915−147:51 tight glyph ]
916−147:52 tight glyph )
917−148:3 DEDENT
918−148:3 DEDENT
919−148:3 DEDENT
920−148:3 DEDENT
921−148:3 NEWLINE
922−148:3 glyph (
923−148:4 tight name reverse-into
924−148:17 name xs
925−148:20 lit ~
926−148:21 tight glyph )
927−148:22 DEDENT
928−148:22 NEWLINE
tests/golden/prelude-list-helpers/tree.txt+241−279
@@ -87,292 +87,254 @@
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− (cast 40:7
90+ (branch 40:7
91− (apply 40:10 list (tvar 40:16 A))
91+ (wing 40:10 xs)
92− (body 41:9
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (branch 41:9
93+ (arm 42:9
94− (wing 41:12 xs)
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
95+ (tuple 42:21
96− (arm 43:11
96+ (wing 42:22 item)
97− (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
97+ (group 42:27
98− (tuple 43:23
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (wing 43:24 item)
99+ (value 44:1 turn
100− (group 43:29
100+ (gate 44:9
101− (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
101+ (face 44:12 args
102− (value 45:1 turn
102+ (cell 44:17
103− (gate 45:9
103+ (apply 44:18 list (tvar 44:24 A))
104− (face 45:12 args
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (cell 45:17
105+ (body 45:3
106− (apply 45:18 list (tvar 45:24 A))
106+ (branch 45:3
107− (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
107+ (wing 45:6 args)
108− (body 46:3
108+ (arm 46:5
109− (branch 46:3
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (wing 46:6 args)
110+ (body 47:7
111− (arm 47:5
111+ (branch 47:7
112− (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
112+ (wing 47:10 xs)
113− (body 48:7
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (cast 48:7
114+ (arm 49:9
115− (apply 48:10 list (tvar 48:16 B))
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (body 49:9
116+ (tuple 49:21
117− (branch 49:9
117+ (group 49:22
118− (wing 49:12 xs)
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
119+ (group 49:31
120− (arm 51:11
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f))))))))))))
121− (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
121+ (mold 51:1 dime
122− (tuple 51:23
122+ (cell 51:9
123− (group 51:24
123+ (face 51:10 p (aura 51:12 @ta))
124− (call 51:25 (wing 51:25 f) (wing 51:27 item)))
124+ (face 51:16 q (aura 51:18 @))))
125− (group 51:33
125+ (mold 53:1 hair
126− (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f))))))))))))))
127− (mold 53:1 dime
128 (cell 53:9
126 (cell 53:9
129− (face 53:10 p (aura 53:12 @ta))
127+ (face 53:10 p (aura 53:12 @ud))
130− (face 53:16 q (aura 53:18 @))))
128+ (face 53:16 q (aura 53:18 @ud))))
131− (mold 55:1 hair
129+ (mold 55:1 pint
132 (cell 55:9
130 (cell 55:9
133− (face 55:10 p (aura 55:12 @ud))
131+ (face 55:10 p
134− (face 55:16 q (aura 55:18 @ud))))
132+ (cell 55:12
135− (mold 57:1 pint
133+ (face 55:13 p (aura 55:15 @))
136− (cell 57:9
134+ (face 55:17 q (aura 55:19 @))))
137− (face 57:10 p
135+ (face 55:22 q
138− (cell 57:12
136+ (cell 55:24
139− (face 57:13 p (aura 57:15 @))
137+ (face 55:25 p (aura 55:27 @))
140− (face 57:17 q (aura 57:19 @))))
138+ (face 55:29 q (aura 55:31 @))))))
141− (face 57:22 q
139+ (mold 57:1 coin
142− (cell 57:24
140+ (union 58:3
143− (face 57:25 p (aura 57:27 @))
141+ (cell 58:3
144− (face 57:29 q (aura 57:31 @))))))
142+ (const 58:4 %$)
145− (mold 59:1 coin
143+ (face 58:7 p (ref 58:9 dime)))
146− (union 60:3
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 %$)
148+ (const 60:4 %many)
149− (face 60:7 p (ref 60:9 dime)))
149+ (face 60:10 p
150− (cell 61:3
150+ (apply 60:12 list (ref 60:18 coin))))))
151− (const 61:4 %blob)
151+ (mold 62:1 pair
152− (face 61:10 p (noun 61:12)))
152+ (generic 62:9 A B
153− (cell 62:3
153+ (cell 62:18
154− (const 62:4 %many)
154+ (face 62:19 p (tvar 62:21 A))
155− (face 62:10 p
155+ (face 62:23 q (tvar 62:25 B)))))
156− (apply 62:12 list (ref 62:18 coin))))))
156+ (mold 64:1 trel
157− (mold 64:1 pair
157+ (generic 64:9 A B C
158− (generic 64:9 A B
158+ (cell 64:20
159− (cell 64:18
159+ (face 64:21 p (tvar 64:23 A))
160− (face 64:19 p (tvar 64:21 A))
160+ (face 64:25 q (tvar 64:27 B))
161− (face 64:23 q (tvar 64:25 B)))))
161+ (face 64:29 r (tvar 64:31 C)))))
162− (mold 66:1 trel
162+ (mold 66:1 qual
163− (generic 66:9 A B C
163+ (generic 66:9 A B C D
164− (cell 66:20
164+ (cell 66:22
165− (face 66:21 p (tvar 66:23 A))
165+ (face 66:23 p (tvar 66:25 A))
166− (face 66:25 q (tvar 66:27 B))
166+ (face 66:27 q (tvar 66:29 B))
167− (face 66:29 r (tvar 66:31 C)))))
167+ (face 66:31 r (tvar 66:33 C))
168− (mold 68:1 qual
168+ (face 66:35 s (tvar 66:37 D)))))
169− (generic 68:9 A B C D
169+ (mold 68:1 cord (aura 68:9 @t))
170− (cell 68:22
170+ (mold 70:1 knot (aura 70:9 @ta))
171− (face 68:23 p (tvar 68:25 A))
171+ (mold 72:1 tape
172− (face 68:27 q (tvar 68:29 B))
172+ (apply 72:9 list (aura 72:15 @tD)))
173− (face 68:31 r (tvar 68:33 C))
173+ (mold 74:1 path
174− (face 68:35 s (tvar 68:37 D)))))
174+ (apply 74:9 list (ref 74:15 knot)))
175− (mold 70:1 cord (aura 70:9 @t))
175+ (mold 76:1 tank
176− (mold 72:1 knot (aura 72:9 @ta))
176+ (union 77:3
177− (mold 74:1 tape
177+ (ref 77:3 cord)
178− (apply 74:9 list (aura 74:15 @tD)))
178+ (cell 78:3
179− (mold 76:1 path
179+ (const 78:4 %leaf)
180− (apply 76:9 list (ref 76:15 knot)))
180+ (face 78:10 p (ref 78:12 tape)))
181− (mold 78:1 tank
181+ (cell 79:3
182− (union 79:3
182+ (const 79:4 %palm)
183− (ref 79:3 cord)
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))))
184 (cell 80:3
187 (cell 80:3
185− (const 80:4 %leaf)
188+ (const 80:4 %rose)
186− (face 80:10 p (ref 80:12 tape)))
189+ (face 80:10 p
187− (cell 81:3
190+ (apply 80:12 trel (ref 80:18 tape) (ref 80:23 tape) (ref 80:28 tape)))
188− (const 81:4 %palm)
191+ (face 80:34 q
189− (face 81:10 p
192+ (apply 80:36 list (ref 80:42 tank))))))
190− (apply 81:12 qual (ref 81:18 tape) (ref 81:23 tape) (ref 81:28 tape) (ref 81:33 tape)))
193+ (mold 82:1 nail
191− (face 81:39 q
194+ (cell 82:9
192− (apply 81:41 list (ref 81:47 tank))))
195+ (face 82:10 p (ref 82:12 hair))
193− (cell 82:3
196+ (face 82:17 q (ref 82:19 tape))))
194− (const 82:4 %rose)
197+ (mold 84:1 edge
195− (face 82:10 p
196− (apply 82:12 trel (ref 82:18 tape) (ref 82:23 tape) (ref 82:28 tape)))
197− (face 82:34 q
198− (apply 82:36 list (ref 82:42 tank))))))
199− (mold 84:1 nail
200 (cell 84:9
198 (cell 84:9
201 (face 84:10 p (ref 84:12 hair))
199 (face 84:10 p (ref 84:12 hair))
202− (face 84:17 q (ref 84:19 tape))))
200+ (face 84:17 q
203− (mold 86:1 edge
201+ (apply 84:19 unit
204− (cell 86:9
202+ (cell 84:25
205− (face 86:10 p (ref 86:12 hair))
203+ (face 84:26 p (noun 84:28))
206− (face 86:17 q
204+ (face 84:30 q (ref 84:32 nail)))))))
207− (apply 86:19 unit
205+ (mold 86:1 rule
208− (cell 86:25
206+ (fn 86:9 (ref 86:12 nail) (ref 86:17 edge)))
209− (face 86:26 p (noun 86:28))
207+ (mold 88:1 spot
210− (face 86:30 q (ref 86:32 nail)))))))
208+ (cell 88:9
211− (mold 88:1 rule
209+ (face 88:10 p (ref 88:12 path))
212− (fn 88:9 (ref 88:12 nail) (ref 88:17 edge)))
210+ (face 88:17 q (ref 88:19 pint))))
213− (mold 90:1 spot
211+ (mold 90:1 toon
214− (cell 90:9
212+ (union 91:3
215− (face 90:10 p (ref 90:12 path))
213+ (cell 91:3
216− (face 90:17 q (ref 90:19 pint))))
214+ (const 91:4 %0)
217− (mold 92:1 toon
215+ (face 91:7 p (noun 91:9)))
218− (union 93:3
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 %0)
220+ (const 93:4 %2)
221− (face 93:7 p (noun 93:9)))
221+ (face 93:7 p
222− (cell 94:3
222+ (apply 93:9 list (ref 93:15 tank))))))
223− (const 94:4 %1)
223+ (mold 95:1 like
224− (face 94:7 p (noun 94:9)))
224+ (generic 95:9 A
225− (cell 95:3
225+ (cell 95:16
226− (const 95:4 %2)
226+ (face 95:17 p (ref 95:19 hair))
227− (face 95:7 p
227+ (face 95:24 q
228− (apply 95:9 list (ref 95:15 tank))))))
228+ (apply 95:26 unit
229− (mold 97:1 like
229+ (cell 95:32
230− (generic 97:9 A
230+ (face 95:33 p (tvar 95:35 A))
231− (cell 97:16
231+ (face 95:37 q (ref 95:39 nail))))))))
232− (face 97:17 p (ref 97:19 hair))
232+ (value 97:1 wonk
233− (face 97:24 q
233+ (gate 97:9
234− (apply 97:26 unit
234+ (face 97:12 veq
235− (cell 97:32
235+ (apply 97:16 like (tvar 97:22 A)))
236− (face 97:33 p (tvar 97:35 A))
236+ (body 98:3
237− (face 97:37 q (ref 97:39 nail))))))))
237+ (branch 98:3
238− (value 99:1 like
238+ (wing 98:6 q.veq)
239− (gate 99:9
239+ (arm 99:5 (lit 99:5 ~) (crash 99:7))
240− (cell 99:12
240+ (arm 100:5
241− (face 99:13 f
241+ (cell 100:5 (lit 100:6 ~) (bind 100:8 product))
242− (fn 99:15 (tvar 99:18 A) (tvar 99:20 B)))
242+ (wing 100:17 p.product))))))
243− (face 99:23 result
243+ (mold 102:1 lone
244− (apply 99:30 like (tvar 99:36 A))))
244+ (generic 102:9 A
245− (body 100:3
245+ (cell 102:16
246− (value 100:3 mapped
246+ (face 102:17 p (tvar 102:19 A)))))
247− (body 101:5
247+ (mold 104:1 lest
248− (cast 101:5
248+ (generic 104:9 A
249− (apply 101:8 unit
249+ (cell 104:16
250− (cell 101:14
250+ (face 104:17 i (tvar 104:19 A))
251− (face 101:15 p (tvar 101:17 B))
251+ (face 104:21 t
252− (face 101:19 q (ref 101:21 nail))))
252+ (apply 104:23 list (tvar 104:29 A))))))
253− (body 102:7
253+ (mold 106:1 pole
254− (branch 102:7
254+ (generic 106:9 A
255− (wing 102:10 q.result)
255+ (union 107:3
256− (arm 103:9 (lit 103:9 ~) (lit 103:11 ~))
256+ (const 107:3 ~)
257− (arm 104:9
257+ (cell 108:3
258− (cell 104:9 (lit 104:10 ~) (bind 104:12 value))
258+ (tvar 108:4 A)
259− (unit 104:19
259+ (apply 108:6 pole (tvar 108:12 A))))))
260− (tuple 104:20
260+ (mold 110:1 quip
261− (face 104:21 p
261+ (generic 110:9 A B
262− (group 104:23
262+ (cell 110:18
263− (call 104:24 (wing 104:24 f) (wing 104:26 p.value))))
263+ (apply 110:19 list (tvar 110:25 A))
264− (face 104:35 q (wing 104:37 q.value))))))))))
264+ (tvar 110:28 B))))
265− (cast 105:3
265+ (mold 112:1 tree
266− (apply 105:6 like (tvar 105:12 B))
267− (tuple 105:15
268− (face 105:16 p (wing 105:18 p.result))
269− (face 105:27 q (wing 105:29 mapped)))))))
270− (value 107:1 wonk
271− (gate 107:9
272− (face 107:12 veq
273− (apply 107:16 like (tvar 107:22 A)))
274− (body 108:3
275− (branch 108:3
276− (wing 108:6 q.veq)
277− (arm 109:5 (lit 109:5 ~) (crash 109:7))
278− (arm 110:5
279− (cell 110:5 (lit 110:6 ~) (bind 110:8 product))
280− (wing 110:17 p.product))))))
281− (mold 112:1 lone
282 (generic 112:9 A
266 (generic 112:9 A
283− (cell 112:16
267+ (union 113:3
284− (face 112:17 p (tvar 112:19 A)))))
268+ (const 113:3 ~)
285− (mold 114:1 lest
269+ (cell 114:3
286− (generic 114:9 A
270+ (face 114:4 n (tvar 114:6 A))
287− (cell 114:16
271+ (face 114:8 l
288− (face 114:17 i (tvar 114:19 A))
272+ (apply 114:10 tree (tvar 114:16 A)))
289− (face 114:21 t
273+ (face 114:19 r
290− (apply 114:23 list (tvar 114:29 A))))))
274+ (apply 114:21 tree (tvar 114:27 A)))))))
291− (mold 116:1 pole
275+ (mold 116:1 each
292− (generic 116:9 A
276+ (generic 116:9 A B
293 (union 117:3
277 (union 117:3
294− (const 117:3 ~)
278+ (cell 117:3
279+ (const 117:4 %|)
280+ (face 117:7 p (tvar 117:9 B)))
295 (cell 118:3
281 (cell 118:3
296− (tvar 118:4 A)
282+ (const 118:4 %&)
297− (apply 118:6 pole (tvar 118:12 A))))))
283+ (face 118:7 p (tvar 118:9 A))))))
298− (mold 120:1 quip
284+ (mold 120:1 bloq (aura 120:9 @))
299− (generic 120:9 A B
285+ (value 122:1 some
300− (cell 120:18
286+ (gate 122:9
301− (apply 120:19 list (tvar 120:25 A))
287+ (face 122:12 item (tvar 122:17 A))
302− (tvar 120:28 B))))
288+ (unit 122:19 (wing 122:20 item))))
303− (mold 122:1 tree
289+ (value 124:1 lure
304− (generic 122:9 A
290+ (gate 124:9
305− (union 123:3
291+ (face 124:12 item (tvar 124:17 A))
306− (const 123:3 ~)
292+ (body 125:3
307− (cell 124:3
293+ (cast 125:3
308− (face 124:4 n (tvar 124:6 A))
294+ (apply 125:6 list (tvar 125:12 A))
309− (face 124:8 l
295+ (tuple 125:15 (wing 125:16 item) (lit 125:21 ~))))))
310− (apply 124:10 tree (tvar 124:16 A)))
296+ (value 127:1 snoc
311− (face 124:19 r
297+ (gate 127:9
312− (apply 124:21 tree (tvar 124:27 A)))))))
298+ (face 127:12 args
313− (mold 126:1 each
299+ (cell 127:17
314− (generic 126:9 A B
300+ (apply 127:18 list (tvar 127:24 A))
315− (union 127:3
301+ (tvar 127:27 A)))
316− (cell 127:3
302+ (body 128:3
317− (const 127:4 %|)
303+ (branch 128:3
318− (face 127:7 p (tvar 127:9 B)))
304+ (wing 128:6 args)
319− (cell 128:3
305+ (arm 129:5
320− (const 128:4 %&)
306+ (cell 129:5 (bind 129:6 xs) (bind 129:9 item))
321− (face 128:7 p (tvar 128:9 A))))))
307+ (group 129:15
322− (mold 130:1 bloq (aura 130:9 @))
308+ (call 129:16
323− (value 132:1 some
309+ (wing 129:16 weld)
324− (gate 132:9
310+ (wing 129:21 xs)
325− (face 132:12 item (tvar 132:17 A))
311+ (tuple 129:24 (wing 129:25 item) (lit 129:30 ~)))))))))
326− (unit 132:19 (wing 132:20 item))))
312+ (value 131:1 flop
327− (value 134:1 lure
313+ (gate 131:9
328− (gate 134:9
314+ (face 131:12 xs
329− (face 134:12 item (tvar 134:17 A))
315+ (apply 131:15 list (tvar 131:21 A)))
330− (body 135:3
316+ (body 132:3
331− (cast 135:3
317+ (value 132:3 reverse-into
332− (apply 135:6 list (tvar 135:12 A))
318+ (gate 132:19
333− (tuple 135:15 (wing 135:16 item) (lit 135:21 ~))))))
319+ (face 132:22 args
334− (value 137:1 snoc
320+ (cell 132:27
335− (gate 137:9
321+ (apply 132:28 list (tvar 132:34 A))
336− (face 137:12 args
322+ (apply 132:37 list (tvar 132:43 A))))
337− (cell 137:17
323+ (body 133:5
338− (apply 137:18 list (tvar 137:24 A))
324+ (branch 133:5
339− (tvar 137:27 A)))
325+ (wing 133:8 args)
340− (body 138:3
326+ (arm 134:7
341− (branch 138:3
327+ (cell 134:7 (bind 134:8 rest) (bind 134:13 acc))
342− (wing 138:6 args)
328+ (body 135:9
343− (arm 139:5
329+ (branch 135:9
344− (cell 139:5 (bind 139:6 xs) (bind 139:9 item))
330+ (wing 135:12 rest)
345− (group 139:15
331+ (arm 136:11 (lit 136:11 ~) (wing 136:13 acc))
346− (call 139:16
332+ (arm 137:11
347− (wing 139:16 weld)
333+ (cell 137:11 (bind 137:12 item) (bind 137:17 more))
348− (wing 139:21 xs)
334+ (group 137:23
349− (tuple 139:24 (wing 139:25 item) (lit 139:30 ~)))))))))
335+ (call 137:24
350− (value 141:1 flop
336+ (wing 137:24 reverse-into)
351− (gate 141:9
337+ (wing 137:37 more)
352− (face 141:12 xs
338+ (tuple 137:42 (wing 137:43 item) (wing 137:48 acc))))))))))))
353− (apply 141:15 list (tvar 141:21 A)))
339+ (group 138:3
354− (body 142:3
340+ (call 138:4 (wing 138:4 reverse-into) (wing 138:17 xs) (lit 138:20 ~)))))))
355− (value 142:3 reverse-into
356− (gate 142:19
357− (face 142:22 args
358− (cell 142:27
359− (apply 142:28 list (tvar 142:34 A))
360− (apply 142:37 list (tvar 142:43 A))))
361− (body 143:5
362− (branch 143:5
363− (wing 143:8 args)
364− (arm 144:7
365− (cell 144:7 (bind 144:8 rest) (bind 144:13 acc))
366− (body 145:9
367− (branch 145:9
368− (wing 145:12 rest)
369− (arm 146:11 (lit 146:11 ~) (wing 146:13 acc))
370− (arm 147:11
371− (cell 147:11 (bind 147:12 item) (bind 147:17 more))
372− (group 147:23
373− (call 147:24
374− (wing 147:24 reverse-into)
375− (wing 147:37 more)
376− (tuple 147:42 (wing 147:43 item) (wing 147:48 acc))))))))))))
377− (group 148:3
378− (call 148:4 (wing 148:4 reverse-into) (wing 148:17 xs) (lit 148:20 ~)))))))
tests/golden/prelude-list-helpers/types.txt+1−2
@@ -27,7 +27,6 @@ partial inference; module not checked
27+$ spot: not checked
27+$ spot: not checked
28+$ toon: cases proven disjoint; mold not checked
28+$ toon: cases proven disjoint; mold not checked
29+$ like: not checked
29+$ like: not checked
30−++ like: sample mold is not supported by partial inference
31++ wonk: sample mold is not supported by partial inference
30++ wonk: sample mold is not supported by partial inference
32+$ lone: not checked
31+$ lone: not checked
33+$ lest: not checked
32+$ lest: not checked
@@ -36,7 +35,7 @@ partial inference; module not checked
36+$ tree: cases proven disjoint; mold not checked
35+$ tree: cases proven disjoint; mold not checked
37+$ each: cases proven disjoint; mold not checked
36+$ each: cases proven disjoint; mold not checked
38+$ bloq: not checked
37+$ bloq: not checked
39−++ some: unit construction needs the standard prelude in partial inference
38+++ some: expression is not supported by partial inference
40++ lure: cast mold is not supported by partial inference
39++ lure: cast mold is not supported by partial inference
41++ snoc: sample mold is not supported by partial inference
40++ snoc: sample mold is not supported by partial inference
42++ 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+6−8
@@ -37,15 +37,13 @@
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)]
44
43
45++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
46 ?- args
45 ?- args
47 [xs f]
46 [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+72−86
@@ -190,90 +190,76 @@
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 glyph (
194+40:10 name xs
195−40:11 tight name list
196−40:16 tvar A
197−40:17 tight glyph )
19841:9 INDENT
19541:9 INDENT
199−41:9 glyph ?-
196+41:9 lit ~
200−41:12 name xs
197+41:11 name ys
201−42:11 INDENT
198+42:9 NEWLINE
202−42:11 lit ~
199+42:9 glyph [
203−42:13 name ys
200+42:10 tight name item
204−43:11 NEWLINE
201+42:15 name rest
205−43:11 glyph [
202+42:19 tight glyph ]
206−43:12 tight name item
203+42:21 glyph [
207−43:17 name rest
204+42:22 tight name item
208−43:21 tight glyph ]
205+42:27 glyph (
209−43:23 glyph [
206+42:28 tight name weld
210−43:24 tight name item
207+42:33 name rest
211−43:29 glyph (
208+42:38 name ys
212−43:30 tight name weld
209+42:40 tight glyph )
213−43:35 name rest
210+42:41 tight glyph ]
214−43:40 name ys
211+44:1 DEDENT
215−43:42 tight glyph )
212+44:1 DEDENT
216−43:43 tight glyph ]
213+44:1 DEDENT
217−45:1 DEDENT
214+44:1 DEDENT
218−45:1 DEDENT
215+44:1 NEWLINE
219−45:1 DEDENT
216+44:1 glyph ++
220−45:1 DEDENT
217+44:4 name turn
221−45:1 DEDENT
218+44:9 glyph |=
222−45:1 NEWLINE
219+44:12 name args
223−45:1 glyph ++
220+44:16 tight glyph =
224−45:4 name turn
221+44:17 tight glyph [
225−45:9 glyph |=
222+44:18 tight glyph (
226−45:12 name args
223+44:19 tight name list
227−45:16 tight glyph =
224+44:24 tvar A
228−45:17 tight glyph [
225+44:25 tight glyph )
229−45:18 tight glyph (
226+44:27 glyph $-(
230−45:19 tight name list
227+44:30 tight tvar A
231−45:24 tvar A
228+44:32 tvar B
232−45:25 tight glyph )
229+44:33 tight glyph )
233−45:27 glyph $-(
230+44:34 tight glyph ]
234−45:30 tight tvar A
231+45:3 INDENT
235−45:32 tvar B
232+45:3 glyph ?-
236−45:33 tight glyph )
233+45:6 name args
237−45:34 tight glyph ]
234+46:5 INDENT
238−46:3 INDENT
235+46:5 glyph [
239−46:3 glyph ?-
236+46:6 tight name xs
240−46:6 name args
237+46:9 name f
241−47:5 INDENT
238+46:10 tight glyph ]
242−47:5 glyph [
239+47:7 INDENT
243−47:6 tight name xs
240+47:7 glyph ?-
244−47:9 name f
241+47:10 name xs
245−47:10 tight glyph ]
242+48:9 INDENT
246−48:7 INDENT
243+48:9 lit ~
247−48:7 glyph ^-
244+48:11 lit ~
248−48:10 glyph (
245+49:9 NEWLINE
249−48:11 tight name list
246+49:9 glyph [
250−48:16 tvar B
247+49:10 tight name item
251−48:17 tight glyph )
248+49:15 name rest
252−49:9 INDENT
249+49:19 tight glyph ]
253−49:9 glyph ?-
250+49:21 glyph [
254−49:12 name xs
251+49:22 tight glyph (
255−50:11 INDENT
252+49:23 tight name f
256−50:11 lit ~
253+49:25 name item
257−50:13 lit ~
254+49:29 tight glyph )
258−51:11 NEWLINE
255+49:31 glyph (
259−51:11 glyph [
256+49:32 tight name turn
260−51:12 tight name item
257+49:37 name rest
261−51:17 name rest
258+49:42 name f
262−51:21 tight glyph ]
259+49:43 tight glyph )
263−51:23 glyph [
260+49:44 tight glyph ]
264−51:24 tight glyph (
261+49:45 DEDENT
265−51:25 tight name f
262+49:45 DEDENT
266−51:27 name item
263+49:45 DEDENT
267−51:31 tight glyph )
264+49:45 DEDENT
268−51:33 glyph (
265+49:45 NEWLINE
269−51:34 tight name turn
270−51:39 name rest
271−51:44 name f
272−51:45 tight glyph )
273−51:46 tight glyph ]
274−51:47 DEDENT
275−51:47 DEDENT
276−51:47 DEDENT
277−51:47 DEDENT
278−51:47 DEDENT
279−51:47 NEWLINE
tests/golden/prelude-list-unit/tree.txt+31−37
@@ -87,40 +87,34 @@
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− (cast 40:7
90+ (branch 40:7
91− (apply 40:10 list (tvar 40:16 A))
91+ (wing 40:10 xs)
92− (body 41:9
92+ (arm 41:9 (lit 41:9 ~) (wing 41:11 ys))
93− (branch 41:9
93+ (arm 42:9
94− (wing 41:12 xs)
94+ (cell 42:9 (bind 42:10 item) (bind 42:15 rest))
95− (arm 42:11 (lit 42:11 ~) (wing 42:13 ys))
95+ (tuple 42:21
96− (arm 43:11
96+ (wing 42:22 item)
97− (cell 43:11 (bind 43:12 item) (bind 43:17 rest))
97+ (group 42:27
98− (tuple 43:23
98+ (call 42:28 (wing 42:28 weld) (wing 42:33 rest) (wing 42:38 ys))))))))))))
99− (wing 43:24 item)
99+ (value 44:1 turn
100− (group 43:29
100+ (gate 44:9
101− (call 43:30 (wing 43:30 weld) (wing 43:35 rest) (wing 43:40 ys))))))))))))))
101+ (face 44:12 args
102− (value 45:1 turn
102+ (cell 44:17
103− (gate 45:9
103+ (apply 44:18 list (tvar 44:24 A))
104− (face 45:12 args
104+ (fn 44:27 (tvar 44:30 A) (tvar 44:32 B))))
105− (cell 45:17
105+ (body 45:3
106− (apply 45:18 list (tvar 45:24 A))
106+ (branch 45:3
107− (fn 45:27 (tvar 45:30 A) (tvar 45:32 B))))
107+ (wing 45:6 args)
108− (body 46:3
108+ (arm 46:5
109− (branch 46:3
109+ (cell 46:5 (bind 46:6 xs) (bind 46:9 f))
110− (wing 46:6 args)
110+ (body 47:7
111− (arm 47:5
111+ (branch 47:7
112− (cell 47:5 (bind 47:6 xs) (bind 47:9 f))
112+ (wing 47:10 xs)
113− (body 48:7
113+ (arm 48:9 (lit 48:9 ~) (lit 48:11 ~))
114− (cast 48:7
114+ (arm 49:9
115− (apply 48:10 list (tvar 48:16 B))
115+ (cell 49:9 (bind 49:10 item) (bind 49:15 rest))
116− (body 49:9
116+ (tuple 49:21
117− (branch 49:9
117+ (group 49:22
118− (wing 49:12 xs)
118+ (call 49:23 (wing 49:23 f) (wing 49:25 item)))
119− (arm 50:11 (lit 50:11 ~) (lit 50:13 ~))
119+ (group 49:31
120− (arm 51:11
120+ (call 49:32 (wing 49:32 turn) (wing 49:37 rest) (wing 49:42 f)))))))))))))
121− (cell 51:11 (bind 51:12 item) (bind 51:17 rest))
122− (tuple 51:23
123− (group 51:24
124− (call 51:25 (wing 51:25 f) (wing 51:27 item)))
125− (group 51:33
126− (call 51:34 (wing 51:34 turn) (wing 51:39 rest) (wing 51:44 f)))))))))))))))
tests/golden/prelude-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`, `clap` 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` and `clef`, and 2b includes `join`, `murn`, `rear`, `snip`, `skim`, `skip`, `levy`, `lien`, `roll` and `reel`. Folds take an explicit start.
2−tests: The complete current prelude parses, including unit-to-list conversion, unit mapping and flat mapping, a curried unit-producing filter, three ways to combine units, including `clap` with one shared value type, complementary list filters, present-product mapping, joining, last-item operations, all/any predicates, and left and right folds. The filters retain the order of their selected items. It also includes the source-backed `ask` re-export and `pure` gate.
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.
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+66−132
@@ -1,9 +1,4 @@
1−/= internal /lib/jibb/internal
2−+$ poke poke.internal
3−+$ qath qath.internal
4−
5:: Initial prelude functions. The rest of the inventory is still to come.
1:: Initial prelude functions. The rest of the inventory is still to come.
6−
7++ same |= x=A x
2++ same |= x=A x
8
3
9++ head |= p=[A B]
4++ head |= p=[A B]
@@ -42,18 +37,16 @@
42++ weld |= args=[(list A) (list A)]
37++ weld |= args=[(list A) (list A)]
43 ?- args
38 ?- args
44 [xs ys]
39 [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)]
49
43
50++ turn |= args=[(list A) $-(A B)]
44++ turn |= args=[(list A) $-(A B)]
51 ?- args
45 ?- args
52 [xs f]
46 [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)]
57
50
58+$ dime [p=@ta q=@]
51+$ dime [p=@ta q=@]
59
52
@@ -101,14 +94,6 @@
101
94
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
95+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
103
96
104−++ like |= [f=$-(A B) result=(like A)]
105− ++ mapped
106− ^- (unit [p=B q=nail])
107− ?- q.result
108− ~ ~
109− [~ value] `[p=(f p.value) q=q.value]
110− ^- (like B) [p=p.result q=mapped]
111−
112++ wonk |= veq=(like A)
97++ wonk |= veq=(like A)
113 ?- q.veq
98 ?- q.veq
114 ~ !!
99 ~ !!
@@ -153,34 +138,27 @@
153 (reverse-into xs ~)
138 (reverse-into xs ~)
154
139
155++ drop |= maybe=(unit A)
140++ drop |= maybe=(unit A)
156− ^- (list A)
141+ ?- maybe
157− ?- maybe
142+ ~ ~
158− ~ ~
143+ [~ value] [value ~]
159− [~ value] [value ~]
160−
161−++ bond |= fallback=$-(~ A)
162− |= maybe=(unit A)
163− ?- maybe
164− ~ (fallback ~)
165− [~ value] value
166
144
167++ bind |= args=[(unit A) $-(A B)]
145++ bind |= args=[(unit A) $-(A B)]
168 ?- args
146 ?- args
169− [maybe f] ^- (unit B)
147+ [maybe f]
170 ?- maybe
148 ?- maybe
171 ~ ~
149 ~ ~
172 [~ value] `(f value)
150 [~ value] `(f value)
173
151
174++ biff |= args=[(unit A) $-(A (unit B))]
152++ biff |= args=[(unit A) $-(A (unit B))]
175 ?- args
153 ?- args
176− [maybe f] ^- (unit B)
154+ [maybe f]
177 ?- maybe
155 ?- maybe
178 ~ ~
156 ~ ~
179 [~ value] (f value)
157 [~ value] (f value)
180
158
181++ both |= args=[(unit A) (unit B)]
159++ both |= args=[(unit A) (unit B)]
182 ?- args
160 ?- args
183− [first second] ^- (unit [A B])
161+ [first second]
184 ?- first
162 ?- first
185 ~ ~
163 ~ ~
186 [~ a]
164 [~ a]
@@ -188,19 +166,9 @@
188 ~ ~
166 ~ ~
189 [~ b] `[a b]
167 [~ b] `[a b]
190
168
191−++ clap |= args=[(unit A) (unit A) $-([A A] A)]
192− ?- args
193− [first second combine] ^- (unit A)
194− ?- first
195− ~ second
196− [~ a]
197− ?- second
198− ~ first
199− [~ b] `(combine a b)
200−
201++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
169++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
202 ?- args
170 ?- args
203− [first second combine] ^- (unit C)
171+ [first second combine]
204 ?- first
172 ?- first
205 ~ ~
173 ~ ~
206 [~ a]
174 [~ a]
@@ -210,45 +178,43 @@
210
178
211++ skim |= args=[(list A) $-(A ?)]
179++ skim |= args=[(list A) $-(A ?)]
212 ?- args
180 ?- args
213− [xs predicate] ^- (list A)
181+ [xs predicate]
214− ?- xs
182+ ?- xs
215− ~ ~
183+ ~ ~
216− [item rest]
184+ [item rest]
217− ?- (predicate item)
185+ ?- (predicate item)
218− %.y [item (skim rest predicate)]
186+ %.y [item (skim rest predicate)]
219− %.n (skim rest predicate)
187+ %.n (skim rest predicate)
220
188
221++ skip |= args=[(list A) $-(A ?)]
189++ skip |= args=[(list A) $-(A ?)]
222 ?- args
190 ?- args
223− [xs predicate] ^- (list A)
191+ [xs predicate]
224− ?- xs
192+ ?- xs
225− ~ ~
193+ ~ ~
226− [item rest]
194+ [item rest]
227− ?- (predicate item)
195+ ?- (predicate item)
228− %.y (skip rest predicate)
196+ %.y (skip rest predicate)
229− %.n [item (skip rest predicate)]
197+ %.n [item (skip rest predicate)]
230
198
231++ levy |= args=[(list A) $-(A ?)]
199++ levy |= args=[(list A) $-(A ?)]
232− ^- ?
200+ ?- args
233− ?- args
201+ [xs predicate]
234− [xs predicate]
202+ ?- xs
235− ?- xs
203+ ~ %.y
236− ~ %.y
204+ [item rest]
237− [item rest]
205+ ?- (predicate item)
238− ?- (predicate item)
206+ %.y (levy rest predicate)
239− %.y (levy rest predicate)
207+ %.n %.n
240− %.n %.n
241
208
242++ lien |= args=[(list A) $-(A ?)]
209++ lien |= args=[(list A) $-(A ?)]
243− ^- ?
210+ ?- args
244− ?- args
211+ [xs predicate]
245− [xs predicate]
212+ ?- xs
246− ?- xs
213+ ~ %.n
247− ~ %.n
214+ [item rest]
248− [item rest]
215+ ?- (predicate item)
249− ?- (predicate item)
216+ %.y %.y
250− %.y %.y
217+ %.n (lien rest predicate)
251− %.n (lien rest predicate)
252
218
253++ roll |= args=[(list A) B $-([A B] B)]
219++ roll |= args=[(list A) B $-([A B] B)]
254 ?- args
220 ?- args
@@ -266,39 +232,37 @@
266
232
267++ flit |= predicate=$-(A ?)
233++ flit |= predicate=$-(A ?)
268 |= value=A
234 |= value=A
269− ^- (unit A)
235+ ?- (predicate value)
270− ?- (predicate value)
236+ %.y `value
271− %.y `value
237+ %.n ~
272− %.n ~
273
238
274++ murn |= args=[(list A) $-(A (unit B))]
239++ murn |= args=[(list A) $-(A (unit B))]
275 ?- args
240 ?- args
276− [xs f] ^- (list B)
241+ [xs f]
277− ?- xs
242+ ?- xs
278− ~ ~
243+ ~ ~
279− [item rest]
244+ [item rest]
280− ?- (f item)
245+ ?- (f item)
281− ~ (murn rest f)
246+ ~ (murn rest f)
282− [~ value] [value (murn rest f)]
247+ [~ value] [value (murn rest f)]
283
248
284++ join |= args=[A (list A)]
249++ join |= args=[A (list A)]
285 ?- args
250 ?- args
286− [separator xs] ^- (list A)
251+ [separator xs]
287− ?- xs
252+ ?- xs
288− ~ ~
253+ ~ ~
289− [item rest]
254+ [item rest]
290− ?- rest
255+ ?- rest
291− ~ [item ~]
256+ ~ [item ~]
292− [next more] [item [separator (join separator rest)]]
257+ [next more] [item [separator (join separator rest)]]
293
258
294++ snip |= xs=(list A)
259++ snip |= xs=(list A)
295− ^- (list A)
260+ ?- xs
296− ?- xs
261+ ~ ~
297− ~ ~
262+ [item rest]
298− [item rest]
263+ ?- rest
299− ?- rest
264+ ~ ~
300− ~ ~
265+ [next more] [item (snip rest)]
301− [next more] [item (snip rest)]
302
266
303++ rear |= xs=(list A)
267++ rear |= xs=(list A)
304 ?- xs
268 ?- xs
@@ -307,33 +271,3 @@
307 ?- rest
271 ?- rest
308 ~ item
272 ~ item
309 [next more] (rear rest)
273 [next more] (rear rest)
310−
311−++ cork |= gates=[$-(A B) $-(B C)]
312− ?- gates
313− [f g] |= x=A (g (f x))
314−
315−++ corl |= gates=[$-(B C) $-(A B)]
316− ?- gates
317− [f g] |= x=A (f (g x))
318−
319−++ cury |= args=[$-([A B] C) A]
320− ?- args
321− [f a] |= b=B (f a b)
322−
323−++ curr |= args=[$-([A B] C) B]
324− ?- args
325− [f b] |= a=A (f a b)
326−
327−+$ cmd |$ [M]
328− [%poke p=poke reply=$-((unit @t) M)]
329− [%go url=@t]
330− [%wait gap=@dr msg=M]
331− [%now reply=$-(@da M)]
332− [%who reply=$-(@p M)]
333−
334−++ gth |= args=[A A] (gth-atom.internal args)
335−++ add |= args=[A A] (add-atom.internal args)
336−++ dec |= atom=A (dec-atom.internal atom)
337−
338−+$ ask |$ [M] (ask.internal M)
339−++ pure |= x=M ^- (ask M) [%pure x]
tests/golden/prelude-unit-list-transforms/tokens.txt+1611−2167
@@ -1,586 +1,604 @@
1−1:1 glyph /=
1+2:1 glyph ++
2−1:4 name internal
2+2:4 name same
3−1:13 glyph /
3+2:9 glyph |=
4−1:14 tight knot lib
4+2:12 name x
5−1:17 tight glyph /
5+2:13 tight glyph =
6−1:18 tight knot jibb
6+2:14 tight tvar A
7−1:22 tight glyph /
7+2:16 name x
8−1:23 tight knot internal
8+4:1 NEWLINE
9−2:1 NEWLINE
9+4:1 glyph ++
10−2:1 glyph +$
10+4:4 name head
11−2:4 name poke
11+4:9 glyph |=
12−2:9 wing poke.internal
12+4:12 name p
13−3:1 NEWLINE
13+4:13 tight glyph =
14−3:1 glyph +$
14+4:14 tight glyph [
15−3:4 name qath
15+4:15 tight tvar A
16−3:9 wing qath.internal
16+4:17 tvar B
17−7:1 NEWLINE
17+4:18 tight glyph ]
18−7:1 glyph ++
18+5:3 INDENT
19−7:4 name same
19+5:3 glyph ?-
20−7:9 glyph |=
20+5:6 name p
21−7:12 name x
21+6:5 INDENT
22−7:13 tight glyph =
22+6:5 glyph [
23−7:14 tight tvar A
23+6:6 tight name a
24−7:16 name x
24+6:8 name b
25−9:1 NEWLINE
25+6:9 tight glyph ]
26−9:1 glyph ++
26+6:11 name a
27−9:4 name head
27+8:1 DEDENT
28−9:9 glyph |=
28+8:1 DEDENT
29−9:12 name p
29+8:1 NEWLINE
30−9:13 tight glyph =
30+8:1 glyph ++
31−9:14 tight glyph [
31+8:4 name tail
32−9:15 tight tvar A
32+8:9 glyph |=
33−9:17 tvar B
33+8:12 name p
34−9:18 tight glyph ]
34+8:13 tight glyph =
35−10:3 INDENT
35+8:14 tight glyph [
36−10:3 glyph ?-
36+8:15 tight tvar A
37−10:6 name p
37+8:17 tvar B
38−11:5 INDENT
38+8:18 tight glyph ]
39−11:5 glyph [
39+9:3 INDENT
40−11:6 tight name a
40+9:3 glyph ?-
41−11:8 name b
41+9:6 name p
42−11:9 tight glyph ]
42+10:5 INDENT
43−11:11 name a
43+10:5 glyph [
44−13:1 DEDENT
44+10:6 tight name a
45−13:1 DEDENT
45+10:8 name b
46−13:1 NEWLINE
46+10:9 tight glyph ]
47−13:1 glyph ++
47+10:11 name b
48−13:4 name tail
48+12:1 DEDENT
49−13:9 glyph |=
49+12:1 DEDENT
50−13:12 name p
50+12:1 NEWLINE
51−13:13 tight glyph =
51+12:1 glyph ++
52−13:14 tight glyph [
52+12:4 name not
53−13:15 tight tvar A
53+12:8 glyph |=
54−13:17 tvar B
54+12:11 name b
55−13:18 tight glyph ]
55+12:12 tight glyph =
56−14:3 INDENT
56+12:13 tight glyph ?
57−14:3 glyph ?-
57+13:3 INDENT
58−14:6 name p
58+13:3 glyph ?-
59−15:5 INDENT
59+13:6 name b
60−15:5 glyph [
60+14:5 INDENT
61−15:6 tight name a
61+14:5 lit %.y
62−15:8 name b
62+14:9 lit %.n
63−15:9 tight glyph ]
63+15:5 NEWLINE
64−15:11 name b
64+15:5 lit %.n
65+15:9 lit %.y
6517:1 DEDENT
6617:1 DEDENT
6617:1 DEDENT
6717:1 DEDENT
6717:1 NEWLINE
6817:1 NEWLINE
68−17:1 glyph ++
69+17:1 glyph +$
69−17:4 name not
70+17:4 name list
70−17:8 glyph |=
71+17:9 glyph |$
71−17:11 name b
72+17:12 glyph [
72−17:12 tight glyph =
73+17:13 tight tvar A
73−17:13 tight glyph ?
74+17:14 tight glyph ]
7418:3 INDENT
7518:3 INDENT
75−18:3 glyph ?-
76+18:3 lit ~
76−18:6 name b
77+19:3 NEWLINE
77−19:5 INDENT
78+19:3 glyph [
78−19:5 lit %.y
79+19:4 tight name i
79−19:9 lit %.n
80+19:5 tight glyph =
80−20:5 NEWLINE
81+19:6 tight tvar A
81−20:5 lit %.n
82+19:8 name t
82−20:9 lit %.y
83+19:9 tight glyph =
83−22:1 DEDENT
84+19:10 tight glyph (
84−22:1 DEDENT
85+19:11 tight name list
85−22:1 NEWLINE
86+19:16 tvar A
86−22:1 glyph +$
87+19:17 tight glyph )
87−22:4 name list
88+19:18 tight glyph ]
88−22:9 glyph |$
89+21:1 DEDENT
89−22:12 glyph [
90+21:1 NEWLINE
90−22:13 tight tvar A
91+21:1 glyph +$
91−22:14 tight glyph ]
92+21:4 name unit
92−23:3 INDENT
93+21:9 glyph |$
93−23:3 lit ~
94+21:12 glyph [
94−24:3 NEWLINE
95+21:13 tight tvar A
95−24:3 glyph [
96+21:14 tight glyph ]
96−24:4 tight name i
97+22:3 INDENT
97−24:5 tight glyph =
98+22:3 lit ~
98−24:6 tight tvar A
99+23:3 NEWLINE
99−24:8 name t
100+23:3 glyph [
100−24:9 tight glyph =
101+23:4 tight lit ~
101−24:10 tight glyph (
102+23:6 name u
102−24:11 tight name list
103+23:7 tight glyph =
103−24:16 tvar A
104+23:8 tight tvar A
104−24:17 tight glyph )
105+23:9 tight glyph ]
105−24:18 tight glyph ]
106+25:1 DEDENT
106−26:1 DEDENT
107+25:1 NEWLINE
107−26:1 NEWLINE
108+25:1 glyph ++
108−26:1 glyph +$
109+25:4 name fall
109−26:4 name unit
110+25:9 glyph |=
110−26:9 glyph |$
111+25:12 name args
111−26:12 glyph [
112+25:16 tight glyph =
112−26:13 tight tvar A
113+25:17 tight glyph [
113−26:14 tight glyph ]
114+25:18 tight glyph (
114−27:3 INDENT
115+25:19 tight name unit
115−27:3 lit ~
116+25:24 tvar A
116−28:3 NEWLINE
117+25:25 tight glyph )
117−28:3 glyph [
118+25:27 tvar A
118−28:4 tight lit ~
119+25:28 tight glyph ]
119−28:6 name u
120+26:3 INDENT
120−28:7 tight glyph =
121+26:3 glyph ?-
121−28:8 tight tvar A
122+26:6 name args
122−28:9 tight glyph ]
123+27:5 INDENT
123−30:1 DEDENT
124+27:5 glyph [
124−30:1 NEWLINE
125+27:6 tight name maybe
125−30:1 glyph ++
126+27:12 name fallback
126−30:4 name fall
127+27:20 tight glyph ]
127−30:9 glyph |=
128+28:7 INDENT
128−30:12 name args
129+28:7 glyph ?-
129−30:16 tight glyph =
130+28:10 name maybe
130−30:17 tight glyph [
131+29:9 INDENT
131−30:18 tight glyph (
132+29:9 lit ~
132−30:19 tight name unit
133+29:11 name fallback
133−30:24 tvar A
134+30:9 NEWLINE
134−30:25 tight glyph )
135+30:9 glyph [
135−30:27 tvar A
136+30:10 tight lit ~
136−30:28 tight glyph ]
137+30:12 name value
137−31:3 INDENT
138+30:17 tight glyph ]
138−31:3 glyph ?-
139+30:19 name value
139−31:6 name args
140+32:1 DEDENT
140−32:5 INDENT
141+32:1 DEDENT
141−32:5 glyph [
142+32:1 DEDENT
142−32:6 tight name maybe
143+32:1 DEDENT
143−32:12 name fallback
144+32:1 NEWLINE
144−32:20 tight glyph ]
145+32:1 glyph ++
145−33:7 INDENT
146+32:4 name need
146−33:7 glyph ?-
147+32:9 glyph |=
147−33:10 name maybe
148+32:12 name maybe
148−34:9 INDENT
149+32:17 tight glyph =
149−34:9 lit ~
150+32:18 tight glyph (
150−34:11 name fallback
151+32:19 tight name unit
151−35:9 NEWLINE
152+32:24 tvar A
152−35:9 glyph [
153+32:25 tight glyph )
153−35:10 tight lit ~
154+33:3 INDENT
154−35:12 name value
155+33:3 glyph ?-
155−35:17 tight glyph ]
156+33:6 name maybe
156−35:19 name value
157+34:5 INDENT
157−37:1 DEDENT
158+34:5 lit ~
158−37:1 DEDENT
159+34:7 glyph !!
160+35:5 NEWLINE
161+35:5 glyph [
162+35:6 tight lit ~
163+35:8 name value
164+35:13 tight glyph ]
165+35:15 name value
15937:1 DEDENT
16637:1 DEDENT
16037:1 DEDENT
16737:1 DEDENT
16137:1 NEWLINE
16837:1 NEWLINE
16237:1 glyph ++
16937:1 glyph ++
163−37:4 name need
170+37:4 name weld
16437:9 glyph |=
17137:9 glyph |=
165−37:12 name maybe
172+37:12 name args
166−37:17 tight glyph =
173+37:16 tight glyph =
174+37:17 tight glyph [
16737:18 tight glyph (
17537:18 tight glyph (
168−37:19 tight name unit
176+37:19 tight name list
16937:24 tvar A
17737:24 tvar A
17037:25 tight glyph )
17837: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 ]
17138:3 INDENT
18438:3 INDENT
17238:3 glyph ?-
18538:3 glyph ?-
173−38:6 name maybe
186+38:6 name args
17439:5 INDENT
18739:5 INDENT
175−39:5 lit ~
188+39:5 glyph [
176−39:7 glyph !!
189+39:6 tight name xs
177−40:5 NEWLINE
190+39:9 name ys
178−40:5 glyph [
191+39:11 tight glyph ]
179−40:6 tight lit ~
192+40:7 INDENT
180−40:8 name value
193+40:7 glyph ?-
181−40:13 tight glyph ]
194+40:10 name xs
182−40:15 name value
195+41:9 INDENT
183−42:1 DEDENT
196+41:9 lit ~
184−42:1 DEDENT
197+41:11 name ys
185−42:1 NEWLINE
198+42:9 NEWLINE
186−42:1 glyph ++
199+42:9 glyph [
187−42:4 name weld
200+42:10 tight name item
188−42:9 glyph |=
201+42:15 name rest
189−42:12 name args
202+42:19 tight glyph ]
190−42:16 tight glyph =
203+42:21 glyph [
191−42:17 tight glyph [
204+42:22 tight name item
192−42:18 tight glyph (
193−42:19 tight name list
194−42:24 tvar A
195−42:25 tight glyph )
19642:27 glyph (
20542:27 glyph (
197−42:28 tight name list
206+42:28 tight name weld
198−42:33 tvar A
207+42:33 name rest
199−42:34 tight glyph )
208+42:38 name ys
200−42:35 tight glyph ]
209+42:40 tight glyph )
201−43:3 INDENT
210+42:41 tight glyph ]
202−43:3 glyph ?-
211+44:1 DEDENT
203−43:6 name args
212+44:1 DEDENT
204−44:5 INDENT
213+44:1 DEDENT
205−44:5 glyph [
214+44:1 DEDENT
206−44:6 tight name xs
215+44:1 NEWLINE
207−44:9 name ys
216+44:1 glyph ++
208−44:11 tight glyph ]
217+44:4 name turn
209−45:7 INDENT
218+44:9 glyph |=
210−45:7 glyph ^-
219+44:12 name args
211−45:10 glyph (
220+44:16 tight glyph =
212−45:11 tight name list
221+44:17 tight glyph [
213−45:16 tvar A
222+44:18 tight glyph (
214−45:17 tight glyph )
223+44:19 tight name list
215−46:9 INDENT
224+44:24 tvar A
216−46:9 glyph ?-
225+44:25 tight glyph )
217−46:12 name xs
226+44:27 glyph $-(
218−47:11 INDENT
227+44:30 tight tvar A
219−47:11 lit ~
228+44:32 tvar B
220−47:13 name ys
229+44:33 tight glyph )
221−48:11 NEWLINE
230+44:34 tight glyph ]
222−48:11 glyph [
231+45:3 INDENT
223−48:12 tight name item
232+45:3 glyph ?-
224−48:17 name rest
233+45:6 name args
225−48:21 tight glyph ]
234+46:5 INDENT
226−48:23 glyph [
235+46:5 glyph [
227−48:24 tight name item
236+46:6 tight name xs
228−48:29 glyph (
237+46:9 name f
229−48:30 tight name weld
238+46:10 tight glyph ]
230−48:35 name rest
239+47:7 INDENT
231−48:40 name ys
240+47:7 glyph ?-
232−48:42 tight glyph )
241+47:10 name xs
233−48:43 tight glyph ]
242+48:9 INDENT
234−50:1 DEDENT
243+48:9 lit ~
235−50:1 DEDENT
244+48:11 lit ~
236−50:1 DEDENT
245+49:9 NEWLINE
237−50:1 DEDENT
246+49:9 glyph [
238−50:1 DEDENT
247+49:10 tight name item
239−50:1 NEWLINE
248+49:15 name rest
240−50:1 glyph ++
249+49:19 tight glyph ]
241−50:4 name turn
250+49:21 glyph [
242−50:9 glyph |=
251+49:22 tight glyph (
243−50:12 name args
252+49:23 tight name f
244−50:16 tight glyph =
253+49:25 name item
245−50:17 tight glyph [
254+49:29 tight glyph )
246−50:18 tight glyph (
255+49:31 glyph (
247−50:19 tight name list
256+49:32 tight name turn
248−50:24 tvar A
257+49:37 name rest
249−50:25 tight glyph )
258+49:42 name f
250−50:27 glyph $-(
259+49:43 tight glyph )
251−50:30 tight tvar A
260+49:44 tight glyph ]
252−50:32 tvar B
261+51:1 DEDENT
253−50:33 tight glyph )
262+51:1 DEDENT
254−50:34 tight glyph ]
263+51:1 DEDENT
255−51:3 INDENT
264+51:1 DEDENT
256−51:3 glyph ?-
265+51:1 NEWLINE
257−51:6 name args
266+51:1 glyph +$
258−52:5 INDENT
267+51:4 name dime
259−52:5 glyph [
268+51:9 glyph [
260−52:6 tight name xs
269+51:10 tight name p
261−52:9 name f
270+51:11 tight glyph =
262−52:10 tight glyph ]
271+51:12 tight aura @ta
263−53:7 INDENT
272+51:16 name q
264−53:7 glyph ^-
273+51:17 tight glyph =
265−53:10 glyph (
274+51:18 tight aura @
266−53:11 tight name list
275+51:19 tight glyph ]
267−53:16 tvar B
276+53:1 NEWLINE
268−53:17 tight glyph )
277+53:1 glyph +$
269−54:9 INDENT
278+53:4 name hair
270−54:9 glyph ?-
279+53:9 glyph [
271−54:12 name xs
280+53:10 tight name p
272−55:11 INDENT
281+53:11 tight glyph =
273−55:11 lit ~
282+53:12 tight aura @ud
274−55:13 lit ~
283+53:16 name q
275−56:11 NEWLINE
284+53:17 tight glyph =
276−56:11 glyph [
285+53:18 tight aura @ud
277−56:12 tight name item
286+53:21 tight glyph ]
278−56:17 name rest
287+55:1 NEWLINE
279−56:21 tight glyph ]
288+55:1 glyph +$
280−56:23 glyph [
289+55:4 name pint
281−56:24 tight glyph (
290+55:9 glyph [
282−56:25 tight name f
291+55:10 tight name p
283−56:27 name item
292+55:11 tight glyph =
284−56:31 tight glyph )
293+55:12 tight glyph [
285−56:33 glyph (
294+55:13 tight name p
286−56:34 tight name turn
295+55:14 tight glyph =
287−56:39 name rest
296+55:15 tight aura @
288−56:44 name f
297+55:17 name q
289−56:45 tight glyph )
298+55:18 tight glyph =
290−56:46 tight glyph ]
299+55:19 tight aura @
291−58:1 DEDENT
300+55:20 tight glyph ]
292−58:1 DEDENT
301+55:22 name q
293−58:1 DEDENT
302+55:23 tight glyph =
294−58:1 DEDENT
303+55:24 tight glyph [
295−58:1 DEDENT
304+55:25 tight name p
296−58:1 NEWLINE
305+55:26 tight glyph =
297−58:1 glyph +$
306+55:27 tight aura @
298−58:4 name dime
307+55:29 name q
299−58:9 glyph [
308+55:30 tight glyph =
300−58:10 tight name p
309+55:31 tight aura @
301−58:11 tight glyph =
310+55:32 tight glyph ]
302−58:12 tight aura @ta
311+55:33 tight glyph ]
303−58:16 name q
312+57:1 NEWLINE
304−58:17 tight glyph =
313+57:1 glyph +$
305−58:18 tight aura @
314+57:4 name coin
306−58:19 tight glyph ]
315+58:3 INDENT
307−60:1 NEWLINE
316+58:3 glyph [
308−60:1 glyph +$
317+58:4 tight lit %$
309−60:4 name hair
318+58:7 name p
310−60:9 glyph [
319+58:8 tight glyph =
311−60:10 tight name p
320+58:9 tight name dime
321+58:13 tight glyph ]
322+59:3 NEWLINE
323+59:3 glyph [
324+59:4 tight lit %blob
325+59:10 name p
326+59:11 tight glyph =
327+59:12 tight glyph *
328+59:13 tight glyph ]
329+60:3 NEWLINE
330+60:3 glyph [
331+60:4 tight lit %many
332+60:10 name p
31260:11 tight glyph =
33360:11 tight glyph =
313−60:12 tight aura @ud
334+60:12 tight glyph (
314−60:16 name q
335+60:13 tight name list
315−60:17 tight glyph =
336+60:18 name coin
316−60:18 tight aura @ud
337+60:22 tight glyph )
317−60:21 tight glyph ]
338+60:23 tight glyph ]
339+62:1 DEDENT
31862:1 NEWLINE
34062:1 NEWLINE
31962:1 glyph +$
34162:1 glyph +$
320−62:4 name pint
342+62:4 name pair
321−62:9 glyph [
343+62:9 glyph |$
322−62:10 tight name p
344+62:12 glyph [
323−62:11 tight glyph =
345+62:13 tight tvar A
324−62:12 tight glyph [
346+62:15 tvar B
325−62:13 tight name p
347+62:16 tight glyph ]
326−62:14 tight glyph =
348+62:18 glyph [
327−62:15 tight aura @
349+62:19 tight name p
328−62:17 name q
350+62:20 tight glyph =
329−62:18 tight glyph =
351+62:21 tight tvar A
330−62:19 tight aura @
352+62:23 name q
331−62:20 tight glyph ]
353+62:24 tight glyph =
332−62:22 name q
354+62:25 tight tvar B
333−62:23 tight glyph =
355+62:26 tight glyph ]
334−62:24 tight glyph [
335−62:25 tight name p
336−62:26 tight glyph =
337−62:27 tight aura @
338−62:29 name q
339−62:30 tight glyph =
340−62:31 tight aura @
341−62:32 tight glyph ]
342−62:33 tight glyph ]
34364:1 NEWLINE
35664:1 NEWLINE
34464:1 glyph +$
35764:1 glyph +$
345−64:4 name coin
358+64:4 name trel
346−65:3 INDENT
359+64:9 glyph |$
347−65:3 glyph [
360+64:12 glyph [
348−65:4 tight lit %$
361+64:13 tight tvar A
349−65:7 name p
362+64:15 tvar B
350−65:8 tight glyph =
363+64:17 tvar C
351−65:9 tight name dime
364+64:18 tight glyph ]
352−65:13 tight glyph ]
365+64:20 glyph [
353−66:3 NEWLINE
366+64:21 tight name p
354−66:3 glyph [
367+64:22 tight glyph =
355−66:4 tight lit %blob
368+64:23 tight tvar A
356−66:10 name p
369+64:25 name q
357−66:11 tight glyph =
370+64:26 tight glyph =
358−66:12 tight glyph *
371+64:27 tight tvar B
359−66:13 tight glyph ]
372+64:29 name r
360−67:3 NEWLINE
373+64:30 tight glyph =
361−67:3 glyph [
374+64:31 tight tvar C
362−67:4 tight lit %many
375+64:32 tight glyph ]
363−67:10 name p
376+66:1 NEWLINE
364−67:11 tight glyph =
377+66:1 glyph +$
365−67:12 tight glyph (
378+66:4 name qual
366−67:13 tight name list
379+66:9 glyph |$
367−67:18 name coin
380+66:12 glyph [
368−67:22 tight glyph )
381+66:13 tight tvar A
369−67:23 tight glyph ]
382+66:15 tvar B
370−69:1 DEDENT
383+66:17 tvar C
371−69:1 NEWLINE
384+66:19 tvar D
372−69:1 glyph +$
385+66:20 tight glyph ]
373−69:4 name pair
386+66:22 glyph [
374−69:9 glyph |$
387+66:23 tight name p
375−69:12 glyph [
388+66:24 tight glyph =
376−69:13 tight tvar A
389+66:25 tight tvar A
377−69:15 tvar B
390+66:27 name q
378−69:16 tight glyph ]
391+66:28 tight glyph =
379−69:18 glyph [
392+66:29 tight tvar B
380−69:19 tight name p
393+66:31 name r
381−69:20 tight glyph =
394+66:32 tight glyph =
382−69:21 tight tvar A
395+66:33 tight tvar C
383−69:23 name q
396+66:35 name s
384−69:24 tight glyph =
397+66:36 tight glyph =
385−69:25 tight tvar B
398+66:37 tight tvar D
386−69:26 tight glyph ]
399+66:38 tight glyph ]
387−71:1 NEWLINE
400+68:1 NEWLINE
388−71:1 glyph +$
401+68:1 glyph +$
389−71:4 name trel
402+68:4 name cord
390−71:9 glyph |$
403+68:9 aura @t
391−71:12 glyph [
404+70:1 NEWLINE
392−71:13 tight tvar A
405+70:1 glyph +$
393−71:15 tvar B
406+70:4 name knot
394−71:17 tvar C
407+70:9 aura @ta
395−71:18 tight glyph ]
408+72:1 NEWLINE
396−71:20 glyph [
409+72:1 glyph +$
397−71:21 tight name p
410+72:4 name tape
398−71:22 tight glyph =
411+72:9 glyph (
399−71:23 tight tvar A
412+72:10 tight name list
400−71:25 name q
413+72:15 aura @tD
401−71:26 tight glyph =
414+72:18 tight glyph )
402−71:27 tight tvar B
415+74:1 NEWLINE
403−71:29 name r
416+74:1 glyph +$
404−71:30 tight glyph =
417+74:4 name path
405−71:31 tight tvar C
418+74:9 glyph (
406−71:32 tight glyph ]
419+74:10 tight name list
407−73:1 NEWLINE
420+74:15 name knot
408−73:1 glyph +$
421+74:19 tight glyph )
409−73:4 name qual
422+76:1 NEWLINE
410−73:9 glyph |$
423+76:1 glyph +$
411−73:12 glyph [
424+76:4 name tank
412−73:13 tight tvar A
425+77:3 INDENT
413−73:15 tvar B
426+77:3 name cord
414−73:17 tvar C
427+78:3 NEWLINE
415−73:19 tvar D
428+78:3 glyph [
416−73:20 tight glyph ]
429+78:4 tight lit %leaf
417−73:22 glyph [
430+78:10 name p
418−73:23 tight name p
431+78:11 tight glyph =
419−73:24 tight glyph =
432+78:12 tight name tape
420−73:25 tight tvar A
433+78:16 tight glyph ]
421−73:27 name q
434+79:3 NEWLINE
422−73:28 tight glyph =
435+79:3 glyph [
423−73:29 tight tvar B
436+79:4 tight lit %palm
424−73:31 name r
437+79:10 name p
425−73:32 tight glyph =
438+79:11 tight glyph =
426−73:33 tight tvar C
439+79:12 tight glyph (
427−73:35 name s
440+79:13 tight name qual
428−73:36 tight glyph =
441+79:18 name tape
429−73:37 tight tvar D
442+79:23 name tape
430−73:38 tight glyph ]
443+79:28 name tape
431−75:1 NEWLINE
444+79:33 name tape
432−75:1 glyph +$
445+79:37 tight glyph )
433−75:4 name cord
446+79:39 name q
434−75:9 aura @t
447+79:40 tight glyph =
435−77:1 NEWLINE
448+79:41 tight glyph (
436−77:1 glyph +$
449+79:42 tight name list
437−77:4 name knot
450+79:47 name tank
438−77:9 aura @ta
451+79:51 tight glyph )
439−79:1 NEWLINE
452+79:52 tight glyph ]
440−79:1 glyph +$
453+80:3 NEWLINE
441−79:4 name tape
454+80:3 glyph [
442−79:9 glyph (
455+80:4 tight lit %rose
443−79:10 tight name list
456+80:10 name p
444−79:15 aura @tD
457+80:11 tight glyph =
445−79:18 tight glyph )
458+80:12 tight glyph (
446−81:1 NEWLINE
459+80:13 tight name trel
447−81:1 glyph +$
460+80:18 name tape
448−81:4 name path
461+80:23 name tape
449−81:9 glyph (
462+80:28 name tape
450−81:10 tight name list
463+80:32 tight glyph )
451−81:15 name knot
464+80:34 name q
452−81:19 tight glyph )
465+80:35 tight glyph =
453−83:1 NEWLINE
466+80:36 tight glyph (
454−83:1 glyph +$
467+80:37 tight name list
455−83:4 name tank
468+80:42 name tank
456−84:3 INDENT
469+80:46 tight glyph )
457−84:3 name cord
470+80:47 tight glyph ]
458−85:3 NEWLINE
471+82:1 DEDENT
459−85:3 glyph [
472+82:1 NEWLINE
460−85:4 tight lit %leaf
473+82:1 glyph +$
461−85:10 name p
474+82:4 name nail
462−85:11 tight glyph =
475+82:9 glyph [
463−85:12 tight name tape
476+82:10 tight name p
464−85:16 tight glyph ]
477+82:11 tight glyph =
465−86:3 NEWLINE
478+82:12 tight name hair
466−86:3 glyph [
479+82:17 name q
467−86:4 tight lit %palm
480+82:18 tight glyph =
468−86:10 name p
481+82:19 tight name tape
469−86:11 tight glyph =
482+82:23 tight glyph ]
470−86:12 tight glyph (
483+84:1 NEWLINE
471−86:13 tight name qual
484+84:1 glyph +$
472−86:18 name tape
485+84:4 name edge
473−86:23 name tape
486+84:9 glyph [
474−86:28 name tape
487+84:10 tight name p
475−86:33 name tape
488+84:11 tight glyph =
476−86:37 tight glyph )
489+84:12 tight name hair
477−86:39 name q
490+84:17 name q
478−86:40 tight glyph =
491+84:18 tight glyph =
479−86:41 tight glyph (
492+84:19 tight glyph (
480−86:42 tight name list
493+84:20 tight name unit
481−86:47 name tank
494+84:25 glyph [
482−86:51 tight glyph )
495+84:26 tight name p
483−86:52 tight glyph ]
496+84:27 tight glyph =
484−87:3 NEWLINE
497+84:28 tight glyph *
485−87:3 glyph [
498+84:30 name q
486−87:4 tight lit %rose
499+84:31 tight glyph =
487−87:10 name p
500+84:32 tight name nail
488−87:11 tight glyph =
501+84:36 tight glyph ]
489−87:12 tight glyph (
502+84:37 tight glyph )
490−87:13 tight name trel
503+84:38 tight glyph ]
491−87:18 name tape
504+86:1 NEWLINE
492−87:23 name tape
505+86:1 glyph +$
493−87:28 name tape
506+86:4 name rule
494−87:32 tight glyph )
507+86:9 glyph $-(
495−87:34 name q
508+86:12 tight name nail
496−87:35 tight glyph =
509+86:17 name edge
497−87:36 tight glyph (
510+86:21 tight glyph )
498−87:37 tight name list
511+88:1 NEWLINE
499−87:42 name tank
512+88:1 glyph +$
500−87:46 tight glyph )
513+88:4 name spot
501−87:47 tight glyph ]
514+88:9 glyph [
502−89:1 DEDENT
515+88:10 tight name p
503−89:1 NEWLINE
516+88:11 tight glyph =
504−89:1 glyph +$
517+88:12 tight name path
505−89:4 name nail
518+88:17 name q
506−89:9 glyph [
519+88:18 tight glyph =
507−89:10 tight name p
520+88:19 tight name pint
508−89:11 tight glyph =
521+88:23 tight glyph ]
509−89:12 tight name hair
522+90:1 NEWLINE
510−89:17 name q
523+90:1 glyph +$
511−89:18 tight glyph =
524+90:4 name toon
512−89:19 tight name tape
525+91:3 INDENT
513−89:23 tight glyph ]
526+91:3 glyph [
514−91:1 NEWLINE
527+91:4 tight lit %0
515−91:1 glyph +$
528+91:7 name p
516−91:4 name edge
529+91:8 tight glyph =
517−91:9 glyph [
530+91:9 tight glyph *
518−91:10 tight name p
531+91:10 tight glyph ]
519−91:11 tight glyph =
532+92:3 NEWLINE
520−91:12 tight name hair
533+92:3 glyph [
521−91:17 name q
534+92:4 tight lit %1
522−91:18 tight glyph =
535+92:7 name p
523−91:19 tight glyph (
536+92:8 tight glyph =
524−91:20 tight name unit
537+92:9 tight glyph *
525−91:25 glyph [
538+92:10 tight glyph ]
526−91:26 tight name p
539+93:3 NEWLINE
527−91:27 tight glyph =
540+93:3 glyph [
528−91:28 tight glyph *
541+93:4 tight lit %2
529−91:30 name q
542+93:7 name p
530−91:31 tight glyph =
543+93:8 tight glyph =
531−91:32 tight name nail
544+93:9 tight glyph (
532−91:36 tight glyph ]
545+93:10 tight name list
533−91:37 tight glyph )
546+93:15 name tank
534−91:38 tight glyph ]
547+93:19 tight glyph )
535−93:1 NEWLINE
548+93:20 tight glyph ]
536−93:1 glyph +$
549+95:1 DEDENT
537−93:4 name rule
538−93:9 glyph $-(
539−93:12 tight name nail
540−93:17 name edge
541−93:21 tight glyph )
54295:1 NEWLINE
55095:1 NEWLINE
54395:1 glyph +$
55195:1 glyph +$
544−95:4 name spot
552+95:4 name like
545−95:9 glyph [
553+95:9 glyph |$
546−95:10 tight name p
554+95:12 glyph [
547−95:11 tight glyph =
555+95:13 tight tvar A
548−95:12 tight name path
556+95:14 tight glyph ]
549−95:17 name q
557+95:16 glyph [
558+95:17 tight name p
55095:18 tight glyph =
55995:18 tight glyph =
551−95:19 tight name pint
560+95:19 tight name hair
552−95:23 tight glyph ]
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 ]
55397:1 NEWLINE
57597:1 NEWLINE
554−97:1 glyph +$
576+97:1 glyph ++
555−97:4 name toon
577+97:4 name wonk
578+97:9 glyph |=
579+97:12 name veq
580+97:15 tight glyph =
581+97:16 tight glyph (
582+97:17 tight name like
583+97:22 tvar A
584+97:23 tight glyph )
55698:3 INDENT
58598:3 INDENT
557−98:3 glyph [
586+98:3 glyph ?-
558−98:4 tight lit %0
587+98:6 wing q.veq
559−98:7 name p
588+99:5 INDENT
560−98:8 tight glyph =
589+99:5 lit ~
561−98:9 tight glyph *
590+99:7 glyph !!
562−98:10 tight glyph ]
591+100:5 NEWLINE
563−99:3 NEWLINE
592+100:5 glyph [
564−99:3 glyph [
593+100:6 tight lit ~
565−99:4 tight lit %1
594+100:8 name product
566−99:7 name p
595+100:15 tight glyph ]
567−99:8 tight glyph =
596+100:17 wing p.product
568−99:9 tight glyph *
597+102:1 DEDENT
569−99:10 tight glyph ]
570−100:3 NEWLINE
571−100:3 glyph [
572−100:4 tight lit %2
573−100:7 name p
574−100:8 tight glyph =
575−100:9 tight glyph (
576−100:10 tight name list
577−100:15 name tank
578−100:19 tight glyph )
579−100:20 tight glyph ]
580102:1 DEDENT
598102:1 DEDENT
581102:1 NEWLINE
599102:1 NEWLINE
582102:1 glyph +$
600102:1 glyph +$
583−102:4 name like
601+102:4 name lone
584102:9 glyph |$
602102:9 glyph |$
585102:12 glyph [
603102:12 glyph [
586102:13 tight tvar A
604102:13 tight tvar A
@@ -588,1647 +606,1073 @@
588102:16 glyph [
606102:16 glyph [
589102:17 tight name p
607102:17 tight name p
590102:18 tight glyph =
608102:18 tight glyph =
591−102:19 tight name hair
609+102:19 tight tvar A
592−102:24 name q
610+102:20 tight glyph ]
593−102:25 tight glyph =
594−102:26 tight glyph (
595−102:27 tight name unit
596−102:32 glyph [
597−102:33 tight name p
598−102:34 tight glyph =
599−102:35 tight tvar A
600−102:37 name q
601−102:38 tight glyph =
602−102:39 tight name nail
603−102:43 tight glyph ]
604−102:44 tight glyph )
605−102:45 tight glyph ]
606104:1 NEWLINE
611104:1 NEWLINE
607−104:1 glyph ++
612+104:1 glyph +$
608−104:4 name like
613+104:4 name lest
609−104:9 glyph |=
614+104:9 glyph |$
610104:12 glyph [
615104:12 glyph [
611−104:13 tight name f
616+104:13 tight tvar A
612−104:14 tight glyph =
617+104:14 tight glyph ]
613−104:15 tight glyph $-(
618+104:16 glyph [
614−104:18 tight tvar A
619+104:17 tight name i
615−104:20 tvar B
620+104:18 tight glyph =
616−104:21 tight glyph )
621+104:19 tight tvar A
617−104:23 name result
622+104:21 name t
618−104:29 tight glyph =
623+104:22 tight glyph =
619−104:30 tight glyph (
624+104:23 tight glyph (
620−104:31 tight name like
625+104:24 tight name list
621−104:36 tvar A
626+104:29 tvar A
622−104:37 tight glyph )
627+104:30 tight glyph )
623−104:38 tight glyph ]
628+104:31 tight glyph ]
624−105:3 INDENT
629+106:1 NEWLINE
625−105:3 glyph ++
630+106:1 glyph +$
626−105:6 name mapped
631+106:4 name pole
627−106:5 INDENT
632+106:9 glyph |$
628−106:5 glyph ^-
633+106:12 glyph [
629−106:8 glyph (
634+106:13 tight tvar A
630−106:9 tight name unit
635+106:14 tight glyph ]
631−106:14 glyph [
636+107:3 INDENT
632−106:15 tight name p
637+107:3 lit ~
633−106:16 tight glyph =
638+108:3 NEWLINE
634−106:17 tight tvar B
639+108:3 glyph [
635−106:19 name q
640+108:4 tight tvar A
636−106:20 tight glyph =
641+108:6 glyph (
637−106:21 tight name nail
642+108:7 tight name pole
638−106:25 tight glyph ]
643+108:12 tvar A
639−106:26 tight glyph )
644+108:13 tight glyph )
640−107:7 INDENT
645+108:14 tight glyph ]
641−107:7 glyph ?-
646+110:1 DEDENT
642−107:10 wing q.result
647+110:1 NEWLINE
643−108:9 INDENT
648+110:1 glyph +$
644−108:9 lit ~
649+110:4 name quip
645−108:11 lit ~
650+110:9 glyph |$
646−109:9 NEWLINE
651+110:12 glyph [
647−109:9 glyph [
652+110:13 tight tvar A
648−109:10 tight lit ~
653+110:15 tvar B
649−109:12 name value
654+110:16 tight glyph ]
650−109:17 tight glyph ]
655+110:18 glyph [
651−109:19 glyph `
656+110:19 tight glyph (
652−109:20 tight glyph [
657+110:20 tight name list
653−109:21 tight name p
658+110:25 tvar A
654−109:22 tight glyph =
659+110:26 tight glyph )
655−109:23 tight glyph (
660+110:28 tvar B
656−109:24 tight name f
661+110:29 tight glyph ]
657−109:26 wing p.value
658−109:33 tight glyph )
659−109:35 name q
660−109:36 tight glyph =
661−109:37 tight wing q.value
662−109:44 tight glyph ]
663−110:3 DEDENT
664−110:3 DEDENT
665−110:3 DEDENT
666−110:3 NEWLINE
667−110:3 glyph ^-
668−110:6 glyph (
669−110:7 tight name like
670−110:12 tvar B
671−110:13 tight glyph )
672−110:15 glyph [
673−110:16 tight name p
674−110:17 tight glyph =
675−110:18 tight wing p.result
676−110:27 name q
677−110:28 tight glyph =
678−110:29 tight name mapped
679−110:35 tight glyph ]
680−112:1 DEDENT
681112:1 NEWLINE
662112:1 NEWLINE
682−112:1 glyph ++
663+112:1 glyph +$
683−112:4 name wonk
664+112:4 name tree
684−112:9 glyph |=
665+112:9 glyph |$
685−112:12 name veq
666+112:12 glyph [
686−112:15 tight glyph =
667+112:13 tight tvar A
687−112:16 tight glyph (
668+112:14 tight glyph ]
688−112:17 tight name like
689−112:22 tvar A
690−112:23 tight glyph )
691113:3 INDENT
669113:3 INDENT
692−113:3 glyph ?-
670+113:3 lit ~
693−113:6 wing q.veq
671+114:3 NEWLINE
694−114:5 INDENT
672+114:3 glyph [
695−114:5 lit ~
673+114:4 tight name n
696−114:7 glyph !!
674+114:5 tight glyph =
697−115:5 NEWLINE
675+114:6 tight tvar A
698−115:5 glyph [
676+114:8 name l
699−115:6 tight lit ~
677+114:9 tight glyph =
700−115:8 name product
678+114:10 tight glyph (
701−115:15 tight glyph ]
679+114:11 tight name tree
702−115:17 wing p.product
680+114:16 tvar A
703−117:1 DEDENT
681+114:17 tight glyph )
704−117:1 DEDENT
682+114:19 name r
705−117:1 NEWLINE
683+114:20 tight glyph =
706−117:1 glyph +$
684+114:21 tight glyph (
707−117:4 name lone
685+114:22 tight name tree
708−117:9 glyph |$
686+114:27 tvar A
709−117:12 glyph [
687+114:28 tight glyph )
710−117:13 tight tvar A
688+114:29 tight glyph ]
711−117:14 tight glyph ]
689+116:1 DEDENT
712−117:16 glyph [
690+116:1 NEWLINE
713−117:17 tight name p
691+116:1 glyph +$
714−117:18 tight glyph =
692+116:4 name each
715−117:19 tight tvar A
693+116:9 glyph |$
716−117:20 tight glyph ]
694+116:12 glyph [
717−119:1 NEWLINE
695+116:13 tight tvar A
718−119:1 glyph +$
696+116:15 tvar B
719−119:4 name lest
697+116:16 tight glyph ]
720−119:9 glyph |$
698+117:3 INDENT
721−119:12 glyph [
699+117:3 glyph [
722−119:13 tight tvar A
700+117:4 tight lit %|
723−119:14 tight glyph ]
701+117:7 name p
724−119:16 glyph [
702+117:8 tight glyph =
725−119:17 tight name i
703+117:9 tight tvar B
726−119:18 tight glyph =
704+117:10 tight glyph ]
727−119:19 tight tvar A
705+118:3 NEWLINE
728−119:21 name t
706+118:3 glyph [
729−119:22 tight glyph =
707+118:4 tight lit %&
730−119:23 tight glyph (
708+118:7 name p
731−119:24 tight name list
709+118:8 tight glyph =
732−119:29 tvar A
710+118:9 tight tvar A
733−119:30 tight glyph )
711+118:10 tight glyph ]
734−119:31 tight glyph ]
712+120:1 DEDENT
735−121:1 NEWLINE
713+120:1 NEWLINE
736−121:1 glyph +$
714+120:1 glyph +$
737−121:4 name pole
715+120:4 name bloq
738−121:9 glyph |$
716+120:9 aura @
739−121:12 glyph [
717+122:1 NEWLINE
740−121:13 tight tvar A
718+122:1 glyph ++
741−121:14 tight glyph ]
719+122:4 name some
742−122:3 INDENT
720+122:9 glyph |=
743−122:3 lit ~
721+122:12 name item
744−123:3 NEWLINE
722+122:16 tight glyph =
745−123:3 glyph [
723+122:17 tight tvar A
746−123:4 tight tvar A
724+122:19 glyph `
747−123:6 glyph (
725+122:20 tight name item
748−123:7 tight name pole
726+124:1 NEWLINE
749−123:12 tvar A
727+124:1 glyph ++
750−123:13 tight glyph )
728+124:4 name lure
751−123:14 tight glyph ]
729+124:9 glyph |=
752−125:1 DEDENT
730+124:12 name item
753−125:1 NEWLINE
731+124:16 tight glyph =
754−125:1 glyph +$
732+124:17 tight tvar A
755−125:4 name quip
733+125:3 INDENT
756−125:9 glyph |$
734+125:3 glyph ^-
757−125:12 glyph [
735+125:6 glyph (
758−125:13 tight tvar A
736+125:7 tight name list
759−125:15 tvar B
737+125:12 tvar A
760−125:16 tight glyph ]
738+125:13 tight glyph )
761−125:18 glyph [
739+125:15 glyph [
762−125:19 tight glyph (
740+125:16 tight name item
763−125:20 tight name list
741+125:21 lit ~
764−125:25 tvar A
742+125:22 tight glyph ]
765−125:26 tight glyph )
743+127:1 DEDENT
766−125:28 tvar B
767−125:29 tight glyph ]
768127:1 NEWLINE
744127:1 NEWLINE
769−127:1 glyph +$
745+127:1 glyph ++
770−127:4 name tree
746+127:4 name snoc
771−127:9 glyph |$
747+127:9 glyph |=
772−127:12 glyph [
748+127:12 name args
773−127:13 tight tvar A
749+127:16 tight glyph =
774−127:14 tight glyph ]
750+127:17 tight glyph [
751+127:18 tight glyph (
752+127:19 tight name list
753+127:24 tvar A
754+127:25 tight glyph )
755+127:27 tvar A
756+127:28 tight glyph ]
775128:3 INDENT
757128:3 INDENT
776−128:3 lit ~
758+128:3 glyph ?-
777−129:3 NEWLINE
759+128:6 name args
778−129:3 glyph [
760+129:5 INDENT
779−129:4 tight name n
761+129:5 glyph [
780−129:5 tight glyph =
762+129:6 tight name xs
781−129:6 tight tvar A
763+129:9 name item
782−129:8 name l
764+129:13 tight glyph ]
783−129:9 tight glyph =
765+129:15 glyph (
784−129:10 tight glyph (
766+129:16 tight name weld
785−129:11 tight name tree
767+129:21 name xs
786−129:16 tvar A
768+129:24 glyph [
787−129:17 tight glyph )
769+129:25 tight name item
788−129:19 name r
770+129:30 lit ~
789−129:20 tight glyph =
771+129:31 tight glyph ]
790−129:21 tight glyph (
772+129:32 tight glyph )
791−129:22 tight name tree
773+131:1 DEDENT
792−129:27 tvar A
793−129:28 tight glyph )
794−129:29 tight glyph ]
795131:1 DEDENT
774131:1 DEDENT
796131:1 NEWLINE
775131:1 NEWLINE
797−131:1 glyph +$
776+131:1 glyph ++
798−131:4 name each
777+131:4 name flop
799−131:9 glyph |$
778+131:9 glyph |=
800−131:12 glyph [
779+131:12 name xs
801−131:13 tight tvar A
780+131:14 tight glyph =
802−131:15 tvar B
781+131:15 tight glyph (
803−131:16 tight glyph ]
782+131:16 tight name list
783+131:21 tvar A
784+131:22 tight glyph )
804132:3 INDENT
785132:3 INDENT
805−132:3 glyph [
786+132:3 glyph ++
806−132:4 tight lit %|
787+132:6 name reverse-into
807−132:7 name p
788+132:19 glyph |=
808−132:8 tight glyph =
789+132:22 name args
809−132:9 tight tvar B
790+132:26 tight glyph =
810−132:10 tight glyph ]
791+132:27 tight glyph [
811−133:3 NEWLINE
792+132:28 tight glyph (
812−133:3 glyph [
793+132:29 tight name list
813−133:4 tight lit %&
794+132:34 tvar A
814−133:7 name p
795+132:35 tight glyph )
815−133:8 tight glyph =
796+132:37 glyph (
816−133:9 tight tvar A
797+132:38 tight name list
817−133:10 tight glyph ]
798+132:43 tvar A
818−135:1 DEDENT
799+132:44 tight glyph )
819−135:1 NEWLINE
800+132:45 tight glyph ]
820−135:1 glyph +$
801+133:5 INDENT
821−135:4 name bloq
802+133:5 glyph ?-
822−135:9 aura @
803+133:8 name args
823−137:1 NEWLINE
804+134:7 INDENT
824−137:1 glyph ++
805+134:7 glyph [
825−137:4 name some
806+134:8 tight name rest
826−137:9 glyph |=
807+134:13 name acc
827−137:12 name item
808+134:16 tight glyph ]
828−137:16 tight glyph =
809+135:9 INDENT
829−137:17 tight tvar A
810+135:9 glyph ?-
830−137:19 glyph `
811+135:12 name rest
831−137:20 tight name item
812+136:11 INDENT
832−139:1 NEWLINE
813+136:11 lit ~
833−139:1 glyph ++
814+136:13 name acc
834−139:4 name lure
815+137:11 NEWLINE
835−139:9 glyph |=
816+137:11 glyph [
836−139:12 name item
817+137:12 tight name item
837−139:16 tight glyph =
818+137:17 name more
838−139:17 tight tvar A
819+137:21 tight glyph ]
839−140:3 INDENT
820+137:23 glyph (
840−140:3 glyph ^-
821+137:24 tight name reverse-into
841−140:6 glyph (
822+137:37 name more
842−140:7 tight name list
823+137:42 glyph [
843−140:12 tvar A
824+137:43 tight name item
844−140:13 tight glyph )
825+137:48 name acc
845−140:15 glyph [
826+137:51 tight glyph ]
846−140:16 tight name item
827+137:52 tight glyph )
847−140:21 lit ~
828+138:3 DEDENT
848−140:22 tight glyph ]
829+138:3 DEDENT
849−142:1 DEDENT
830+138:3 DEDENT
850−142:1 NEWLINE
831+138:3 DEDENT
851−142:1 glyph ++
832+138:3 NEWLINE
852−142:4 name snoc
833+138:3 glyph (
853−142:9 glyph |=
834+138:4 tight name reverse-into
854−142:12 name args
835+138:17 name xs
855−142:16 tight glyph =
836+138:20 lit ~
856−142:17 tight glyph [
837+138:21 tight glyph )
857−142:18 tight glyph (
838+140:1 DEDENT
858−142:19 tight name list
839+140:1 NEWLINE
859−142:24 tvar A
840+140:1 glyph ++
860−142:25 tight glyph )
841+140:4 name drop
861−142:27 tvar A
842+140:9 glyph |=
862−142:28 tight glyph ]
843+140:12 name maybe
863−143:3 INDENT
844+140:17 tight glyph =
864−143:3 glyph ?-
845+140:18 tight glyph (
865−143:6 name args
846+140:19 tight name unit
866−144:5 INDENT
847+140:24 tvar A
867−144:5 glyph [
848+140:25 tight glyph )
868−144:6 tight name xs
849+141:3 INDENT
869−144:9 name item
850+141:3 glyph ?-
870−144:13 tight glyph ]
851+141:6 name maybe
871−144:15 glyph (
852+142:5 INDENT
872−144:16 tight name weld
853+142:5 lit ~
873−144:21 name xs
854+142:7 lit ~
874−144:24 glyph [
855+143:5 NEWLINE
875−144:25 tight name item
856+143:5 glyph [
876−144:30 lit ~
857+143:6 tight lit ~
877−144:31 tight glyph ]
858+143:8 name value
878−144:32 tight glyph )
859+143:13 tight glyph ]
879−146:1 DEDENT
860+143:15 glyph [
880−146:1 DEDENT
861+143:16 tight name value
881−146:1 NEWLINE
862+143:22 lit ~
882−146:1 glyph ++
863+143:23 tight glyph ]
883−146:4 name flop
864+145:1 DEDENT
884−146:9 glyph |=
865+145:1 DEDENT
885−146:12 name xs
866+145:1 NEWLINE
886−146:14 tight glyph =
867+145:1 glyph ++
887−146:15 tight glyph (
868+145:4 name bind
888−146:16 tight name list
869+145:9 glyph |=
889−146:21 tvar A
870+145:12 name args
890−146:22 tight glyph )
871+145:16 tight glyph =
891−147:3 INDENT
872+145:17 tight glyph [
892−147:3 glyph ++
873+145:18 tight glyph (
893−147:6 name reverse-into
874+145:19 tight name unit
894−147:19 glyph |=
875+145:24 tvar A
895−147:22 name args
876+145:25 tight glyph )
896−147:26 tight glyph =
877+145:27 glyph $-(
897−147:27 tight glyph [
878+145:30 tight tvar A
898−147:28 tight glyph (
879+145:32 tvar B
899−147:29 tight name list
880+145:33 tight glyph )
900−147:34 tvar A
881+145:34 tight glyph ]
901−147:35 tight glyph )
882+146:3 INDENT
902−147:37 glyph (
883+146:3 glyph ?-
903−147:38 tight name list
884+146:6 name args
904−147:43 tvar A
885+147:5 INDENT
905−147:44 tight glyph )
886+147:5 glyph [
906−147:45 tight glyph ]
887+147:6 tight name maybe
907−148:5 INDENT
888+147:12 name f
908−148:5 glyph ?-
889+147:13 tight glyph ]
909−148:8 name args
890+148:7 INDENT
910−149:7 INDENT
891+148:7 glyph ?-
911−149:7 glyph [
892+148:10 name maybe
912−149:8 tight name rest
893+149:9 INDENT
913−149:13 name acc
894+149:9 lit ~
914−149:16 tight glyph ]
895+149:11 lit ~
915−150:9 INDENT
896+150:9 NEWLINE
916−150:9 glyph ?-
897+150:9 glyph [
917−150:12 name rest
898+150:10 tight lit ~
918−151:11 INDENT
899+150:12 name value
919−151:11 lit ~
900+150:17 tight glyph ]
920−151:13 name acc
901+150:19 glyph `
921−152:11 NEWLINE
902+150:20 tight glyph (
922−152:11 glyph [
903+150:21 tight name f
923−152:12 tight name item
904+150:23 name value
924−152:17 name more
905+150:28 tight glyph )
925−152:21 tight glyph ]
906+152:1 DEDENT
926−152:23 glyph (
907+152:1 DEDENT
927−152:24 tight name reverse-into
908+152:1 DEDENT
928−152:37 name more
909+152:1 DEDENT
929−152:42 glyph [
910+152:1 NEWLINE
930−152:43 tight name item
911+152:1 glyph ++
931−152:48 name acc
912+152:4 name biff
932−152:51 tight glyph ]
913+152:9 glyph |=
933−152:52 tight glyph )
914+152:12 name args
934−153:3 DEDENT
915+152:16 tight glyph =
935−153:3 DEDENT
916+152:17 tight glyph [
936−153:3 DEDENT
917+152:18 tight glyph (
937−153:3 DEDENT
918+152:19 tight name unit
938−153:3 NEWLINE
919+152:24 tvar A
939−153:3 glyph (
920+152:25 tight glyph )
940−153:4 tight name reverse-into
921+152:27 glyph $-(
941−153:17 name xs
922+152:30 tight tvar A
942−153:20 lit ~
923+152:32 glyph (
943−153:21 tight glyph )
924+152:33 tight name unit
944−155:1 DEDENT
925+152:38 tvar B
945−155:1 NEWLINE
926+152:39 tight glyph )
946−155:1 glyph ++
927+152:40 tight glyph )
947−155:4 name drop
928+152:41 tight glyph ]
948−155:9 glyph |=
929+153:3 INDENT
949−155:12 name maybe
930+153:3 glyph ?-
950−155:17 tight glyph =
931+153:6 name args
951−155:18 tight glyph (
932+154:5 INDENT
952−155:19 tight name unit
933+154:5 glyph [
953−155:24 tvar A
934+154:6 tight name maybe
954−155:25 tight glyph )
935+154:12 name f
955−156:3 INDENT
936+154:13 tight glyph ]
956−156:3 glyph ^-
937+155:7 INDENT
957−156:6 glyph (
938+155:7 glyph ?-
958−156:7 tight name list
939+155:10 name maybe
959−156:12 tvar A
940+156:9 INDENT
960−156:13 tight glyph )
941+156:9 lit ~
961−157:5 INDENT
942+156:11 lit ~
962−157:5 glyph ?-
943+157:9 NEWLINE
963−157:8 name maybe
944+157:9 glyph [
964−158:7 INDENT
945+157:10 tight lit ~
965−158:7 lit ~
946+157:12 name value
966−158:9 lit ~
947+157:17 tight glyph ]
967−159:7 NEWLINE
948+157:19 glyph (
968−159:7 glyph [
949+157:20 tight name f
969−159:8 tight lit ~
950+157:22 name value
970−159:10 name value
951+157:27 tight glyph )
971−159:15 tight glyph ]
952+159:1 DEDENT
972−159:17 glyph [
953+159:1 DEDENT
973−159:18 tight name value
954+159:1 DEDENT
974−159:24 lit ~
955+159:1 DEDENT
975−159:25 tight glyph ]
956+159:1 NEWLINE
976−161:1 DEDENT
957+159:1 glyph ++
977−161:1 DEDENT
958+159:4 name both
978−161:1 DEDENT
959+159:9 glyph |=
979−161:1 NEWLINE
960+159:12 name args
980−161:1 glyph ++
961+159:16 tight glyph =
981−161:4 name bond
962+159:17 tight glyph [
982−161:9 glyph |=
963+159:18 tight glyph (
983−161:12 name fallback
964+159:19 tight name unit
984−161:20 tight glyph =
965+159:24 tvar A
985−161:21 tight glyph $-(
966+159:25 tight glyph )
986−161:24 tight lit ~
967+159:27 glyph (
987−161:26 tvar A
968+159:28 tight name unit
988−161:27 tight glyph )
969+159:33 tvar B
989−162:3 INDENT
970+159:34 tight glyph )
990−162:3 glyph |=
971+159:35 tight glyph ]
991−162:6 name maybe
972+160:3 INDENT
992−162:11 tight glyph =
973+160:3 glyph ?-
993−162:12 tight glyph (
974+160:6 name args
994−162:13 tight name unit
975+161:5 INDENT
995−162:18 tvar A
976+161:5 glyph [
996−162:19 tight glyph )
977+161:6 tight name first
997−163:5 INDENT
978+161:12 name second
998−163:5 glyph ?-
979+161:18 tight glyph ]
999−163:8 name maybe
980+162:7 INDENT
1000−164:7 INDENT
981+162:7 glyph ?-
1001−164:7 lit ~
982+162:10 name first
1002−164:9 glyph (
983+163:9 INDENT
1003−164:10 tight name fallback
984+163:9 lit ~
1004−164:19 lit ~
985+163:11 lit ~
1005−164:20 tight glyph )
986+164:9 NEWLINE
1006−165:7 NEWLINE
987+164:9 glyph [
1007−165:7 glyph [
988+164:10 tight lit ~
1008−165:8 tight lit ~
989+164:12 name a
1009−165:10 name value
990+164:13 tight glyph ]
1010−165:15 tight glyph ]
991+165:11 INDENT
1011−165:17 name value
992+165:11 glyph ?-
1012−167:1 DEDENT
993+165:14 name second
1013−167:1 DEDENT
994+166:13 INDENT
1014−167:1 DEDENT
995+166:13 lit ~
1015−167:1 NEWLINE
996+166:15 lit ~
1016−167:1 glyph ++
997+167:13 NEWLINE
1017−167:4 name bind
998+167:13 glyph [
1018−167:9 glyph |=
999+167:14 tight lit ~
1019−167:12 name args
1000+167:16 name b
1020−167:16 tight glyph =
1001+167:17 tight glyph ]
1021−167:17 tight glyph [
1002+167:19 glyph `
1022−167:18 tight glyph (
1003+167:20 tight glyph [
1023−167:19 tight name unit
1004+167:21 tight name a
1024−167:24 tvar A
1005+167:23 name b
1025−167:25 tight glyph )
1006+167:24 tight glyph ]
1026−167:27 glyph $-(
1007+169:1 DEDENT
1027−167:30 tight tvar A
1008+169:1 DEDENT
1028−167:32 tvar B
1009+169:1 DEDENT
1029−167:33 tight glyph )
1010+169:1 DEDENT
1030−167:34 tight glyph ]
1011+169:1 DEDENT
1031−168:3 INDENT
1012+169:1 DEDENT
1032−168:3 glyph ?-
1013+169:1 NEWLINE
1033−168:6 name args
1014+169:1 glyph ++
1034−169:5 INDENT
1015+169:4 name clef
1035−169:5 glyph [
1016+169:9 glyph |=
1036−169:6 tight name maybe
1017+169:12 name args
1037−169:12 name f
1018+169:16 tight glyph =
1038−169:13 tight glyph ]
1019+169:17 tight glyph [
1039−169:15 glyph ^-
1020+169:18 tight glyph (
1040−169:18 glyph (
1041169:19 tight name unit
1021169:19 tight name unit
1042−169:24 tvar B
1022+169:24 tvar A
1043169:25 tight glyph )
1023169:25 tight glyph )
1044−170:7 INDENT
1024+169:27 glyph (
1045−170:7 glyph ?-
1025+169:28 tight name unit
1046−170:10 name maybe
1026+169:33 tvar B
1047−171:9 INDENT
1027+169:34 tight glyph )
1048−171:9 lit ~
1028+169:36 glyph $-(
1049−171:11 lit ~
1029+169:39 tight glyph [
1050−172:9 NEWLINE
1030+169:40 tight tvar A
1051−172:9 glyph [
1031+169:42 tvar B
1052−172:10 tight lit ~
1032+169:43 tight glyph ]
1053−172:12 name value
1033+169:45 glyph (
1054−172:17 tight glyph ]
1034+169:46 tight name unit
1055−172:19 glyph `
1035+169:51 tvar C
1056−172:20 tight glyph (
1036+169:52 tight glyph )
1057−172:21 tight name f
1037+169:53 tight glyph )
1058−172:23 name value
1038+169:54 tight glyph ]
1059−172:28 tight glyph )
1039+170:3 INDENT
1060−174:1 DEDENT
1040+170:3 glyph ?-
1061−174:1 DEDENT
1041+170:6 name args
1062−174:1 DEDENT
1042+171:5 INDENT
1063−174:1 DEDENT
1043+171:5 glyph [
1064−174:1 NEWLINE
1044+171:6 tight name first
1065−174:1 glyph ++
1045+171:12 name second
1066−174:4 name biff
1046+171:19 name combine
1067−174:9 glyph |=
1047+171:26 tight glyph ]
1068−174:12 name args
1048+172:7 INDENT
1069−174:16 tight glyph =
1049+172:7 glyph ?-
1070−174:17 tight glyph [
1050+172:10 name first
1071−174:18 tight glyph (
1051+173:9 INDENT
1072−174:19 tight name unit
1052+173:9 lit ~
1073−174:24 tvar A
1053+173:11 lit ~
1074−174:25 tight glyph )
1054+174:9 NEWLINE
1075−174:27 glyph $-(
1055+174:9 glyph [
1076−174:30 tight tvar A
1056+174:10 tight lit ~
1077−174:32 glyph (
1057+174:12 name a
1078−174:33 tight name unit
1058+174:13 tight glyph ]
1079−174:38 tvar B
1059+175:11 INDENT
1080−174:39 tight glyph )
1060+175:11 glyph ?-
1081−174:40 tight glyph )
1061+175:14 name second
1082−174:41 tight glyph ]
1062+176:13 INDENT
1083−175:3 INDENT
1063+176:13 lit ~
1084−175:3 glyph ?-
1064+176:15 lit ~
1085−175:6 name args
1065+177:13 NEWLINE
1086−176:5 INDENT
1066+177:13 glyph [
1087−176:5 glyph [
1067+177:14 tight lit ~
1088−176:6 tight name maybe
1068+177:16 name b
1089−176:12 name f
1069+177:17 tight glyph ]
1090−176:13 tight glyph ]
1070+177:19 glyph (
1091−176:15 glyph ^-
1071+177:20 tight name combine
1092−176:18 glyph (
1072+177:28 name a
1093−176:19 tight name unit
1073+177:30 name b
1094−176:24 tvar B
1074+177:31 tight glyph )
1095−176:25 tight glyph )
1075+179:1 DEDENT
1096−177:7 INDENT
1076+179:1 DEDENT
1097−177:7 glyph ?-
1077+179:1 DEDENT
1098−177:10 name maybe
1078+179:1 DEDENT
1099−178:9 INDENT
1079+179:1 DEDENT
1100−178:9 lit ~
1080+179:1 DEDENT
1101−178:11 lit ~
1081+179:1 NEWLINE
1102−179:9 NEWLINE
1082+179:1 glyph ++
1103−179:9 glyph [
1083+179:4 name skim
1104−179:10 tight lit ~
1084+179:9 glyph |=
1105−179:12 name value
1085+179:12 name args
1106−179:17 tight glyph ]
1086+179:16 tight glyph =
1107−179:19 glyph (
1087+179:17 tight glyph [
1108−179:20 tight name f
1088+179:18 tight glyph (
1109−179:22 name value
1089+179:19 tight name list
1110−179:27 tight glyph )
1090+179:24 tvar A
1111−181:1 DEDENT
1091+179:25 tight glyph )
1112−181:1 DEDENT
1092+179:27 glyph $-(
1113−181:1 DEDENT
1093+179:30 tight tvar A
1114−181:1 DEDENT
1094+179:32 glyph ?
1115−181:1 NEWLINE
1095+179:33 tight glyph )
1116−181:1 glyph ++
1096+179:34 tight glyph ]
1117−181:4 name both
1097+180:3 INDENT
1118−181:9 glyph |=
1098+180:3 glyph ?-
1119−181:12 name args
1099+180:6 name args
1120−181:16 tight glyph =
1100+181:5 INDENT
1121−181:17 tight glyph [
1101+181:5 glyph [
1122−181:18 tight glyph (
1102+181:6 tight name xs
1123−181:19 tight name unit
1103+181:9 name predicate
1124−181:24 tvar A
1104+181:18 tight glyph ]
1125−181:25 tight glyph )
1105+182:7 INDENT
1126−181:27 glyph (
1106+182:7 glyph ?-
1127−181:28 tight name unit
1107+182:10 name xs
1128−181:33 tvar B
1108+183:9 INDENT
1129−181:34 tight glyph )
1109+183:9 lit ~
1130−181:35 tight glyph ]
1110+183:11 lit ~
1131−182:3 INDENT
1111+184:9 NEWLINE
1132−182:3 glyph ?-
1112+184:9 glyph [
1133−182:6 name args
1113+184:10 tight name item
1134−183:5 INDENT
1114+184:15 name rest
1135−183:5 glyph [
1115+184:19 tight glyph ]
1136−183:6 tight name first
1116+185:11 INDENT
1137−183:12 name second
1117+185:11 glyph ?-
1138−183:18 tight glyph ]
1118+185:14 glyph (
1139−183:20 glyph ^-
1119+185:15 tight name predicate
1140−183:23 glyph (
1120+185:25 name item
1141−183:24 tight name unit
1121+185:29 tight glyph )
1142−183:29 glyph [
1122+186:13 INDENT
1143−183:30 tight tvar A
1123+186:13 lit %.y
1144−183:32 tvar B
1124+186:17 glyph [
1145−183:33 tight glyph ]
1125+186:18 tight name item
1146−183:34 tight glyph )
1126+186:23 glyph (
1147−184:7 INDENT
1127+186:24 tight name skim
1148−184:7 glyph ?-
1128+186:29 name rest
1149−184:10 name first
1129+186:34 name predicate
1150−185:9 INDENT
1130+186:43 tight glyph )
1151−185:9 lit ~
1131+186:44 tight glyph ]
1152−185:11 lit ~
1132+187:13 NEWLINE
1153−186:9 NEWLINE
1133+187:13 lit %.n
1154−186:9 glyph [
1134+187:17 glyph (
1155−186:10 tight lit ~
1135+187:18 tight name skim
1156−186:12 name a
1136+187:23 name rest
1157−186:13 tight glyph ]
1137+187:28 name predicate
1158−187:11 INDENT
1138+187:37 tight glyph )
1159−187:11 glyph ?-
1139+189:1 DEDENT
1160−187:14 name second
1140+189:1 DEDENT
1161−188:13 INDENT
1141+189:1 DEDENT
1162−188:13 lit ~
1142+189:1 DEDENT
1163−188:15 lit ~
1143+189:1 DEDENT
1164−189:13 NEWLINE
1144+189:1 DEDENT
1165−189:13 glyph [
1145+189:1 NEWLINE
1166−189:14 tight lit ~
1146+189:1 glyph ++
1167−189:16 name b
1147+189:4 name skip
1168−189:17 tight glyph ]
1148+189:9 glyph |=
1169−189:19 glyph `
1149+189:12 name args
1170−189:20 tight glyph [
1150+189:16 tight glyph =
1171−189:21 tight name a
1151+189:17 tight glyph [
1172−189:23 name b
1152+189:18 tight glyph (
1173−189:24 tight glyph ]
1153+189:19 tight name list
1174−191:1 DEDENT
1154+189:24 tvar A
1175−191:1 DEDENT
1155+189:25 tight glyph )
1176−191:1 DEDENT
1156+189:27 glyph $-(
1177−191:1 DEDENT
1157+189:30 tight tvar A
1178−191:1 DEDENT
1158+189:32 glyph ?
1179−191:1 DEDENT
1159+189:33 tight glyph )
1180−191:1 NEWLINE
1160+189:34 tight glyph ]
1181−191:1 glyph ++
1161+190:3 INDENT
1182−191:4 name clap
1162+190:3 glyph ?-
1183−191:9 glyph |=
1163+190:6 name args
1184−191:12 name args
1164+191:5 INDENT
1185−191:16 tight glyph =
1165+191:5 glyph [
1186−191:17 tight glyph [
1166+191:6 tight name xs
1187−191:18 tight glyph (
1167+191:9 name predicate
1188−191:19 tight name unit
1168+191:18 tight glyph ]
1189−191:24 tvar A
1169+192:7 INDENT
1190−191:25 tight glyph )
1170+192:7 glyph ?-
1191−191:27 glyph (
1171+192:10 name xs
1192−191:28 tight name unit
1172+193:9 INDENT
1193−191:33 tvar A
1173+193:9 lit ~
1194−191:34 tight glyph )
1174+193:11 lit ~
1195−191:36 glyph $-(
1175+194:9 NEWLINE
1196−191:39 tight glyph [
1176+194:9 glyph [
1197−191:40 tight tvar A
1177+194:10 tight name item
1198−191:42 tvar A
1178+194:15 name rest
1199−191:43 tight glyph ]
1179+194:19 tight glyph ]
1200−191:45 tvar A
1180+195:11 INDENT
1201−191:46 tight glyph )
1181+195:11 glyph ?-
1202−191:47 tight glyph ]
1182+195:14 glyph (
1203−192:3 INDENT
1183+195:15 tight name predicate
1204−192:3 glyph ?-
1184+195:25 name item
1205−192:6 name args
1185+195:29 tight glyph )
1206−193:5 INDENT
1186+196:13 INDENT
1207−193:5 glyph [
1187+196:13 lit %.y
1208−193:6 tight name first
1188+196:17 glyph (
1209−193:12 name second
1189+196:18 tight name skip
1210−193:19 name combine
1190+196:23 name rest
1211−193:26 tight glyph ]
1191+196:28 name predicate
1212−193:28 glyph ^-
1192+196:37 tight glyph )
1213−193:31 glyph (
1193+197:13 NEWLINE
1214−193:32 tight name unit
1194+197:13 lit %.n
1215−193:37 tvar A
1195+197:17 glyph [
1216−193:38 tight glyph )
1196+197:18 tight name item
1217−194:7 INDENT
1197+197:23 glyph (
1218−194:7 glyph ?-
1198+197:24 tight name skip
1219−194:10 name first
1199+197:29 name rest
1220−195:9 INDENT
1200+197:34 name predicate
1221−195:9 lit ~
1201+197:43 tight glyph )
1222−195:11 name second
1202+197:44 tight glyph ]
1223−196:9 NEWLINE
1203+199:1 DEDENT
1224−196:9 glyph [
1204+199:1 DEDENT
1225−196:10 tight lit ~
1205+199:1 DEDENT
1226−196:12 name a
1206+199:1 DEDENT
1227−196:13 tight glyph ]
1207+199:1 DEDENT
1228−197:11 INDENT
1208+199:1 DEDENT
1229−197:11 glyph ?-
1209+199:1 NEWLINE
1230−197:14 name second
1210+199:1 glyph ++
1231−198:13 INDENT
1211+199:4 name levy
1232−198:13 lit ~
1212+199:9 glyph |=
1233−198:15 name first
1213+199:12 name args
1234−199:13 NEWLINE
1214+199:16 tight glyph =
1235−199:13 glyph [
1215+199:17 tight glyph [
1236−199:14 tight lit ~
1216+199:18 tight glyph (
1237−199:16 name b
1217+199:19 tight name list
1238−199:17 tight glyph ]
1218+199:24 tvar A
1239−199:19 glyph `
1219+199:25 tight glyph )
1240−199:20 tight glyph (
1220+199:27 glyph $-(
1241−199:21 tight name combine
1221+199:30 tight tvar A
1242−199:29 name a
1222+199:32 glyph ?
1243−199:31 name b
1223+199:33 tight glyph )
1244−199:32 tight glyph )
1224+199:34 tight glyph ]
1245−201:1 DEDENT
1225+200:3 INDENT
1246−201:1 DEDENT
1226+200:3 glyph ?-
1247−201:1 DEDENT
1227+200:6 name args
1248−201:1 DEDENT
1228+201:5 INDENT
1249−201:1 DEDENT
1229+201:5 glyph [
1250−201:1 DEDENT
1230+201:6 tight name xs
1251−201:1 NEWLINE
1231+201:9 name predicate
1252−201:1 glyph ++
1232+201:18 tight glyph ]
1253−201:4 name clef
1233+202:7 INDENT
1254−201:9 glyph |=
1234+202:7 glyph ?-
1255−201:12 name args
1235+202:10 name xs
1256−201:16 tight glyph =
1236+203:9 INDENT
1257−201:17 tight glyph [
1237+203:9 lit ~
1258−201:18 tight glyph (
1238+203:11 lit %.y
1259−201:19 tight name unit
1239+204:9 NEWLINE
1260−201:24 tvar A
1240+204:9 glyph [
1261−201:25 tight glyph )
1241+204:10 tight name item
1262−201:27 glyph (
1242+204:15 name rest
1263−201:28 tight name unit
1243+204:19 tight glyph ]
1264−201:33 tvar B
1244+205:11 INDENT
1265−201:34 tight glyph )
1245+205:11 glyph ?-
1266−201:36 glyph $-(
1246+205:14 glyph (
1267−201:39 tight glyph [
1247+205:15 tight name predicate
1268−201:40 tight tvar A
1248+205:25 name item
1269−201:42 tvar B
1249+205:29 tight glyph )
1270−201:43 tight glyph ]
1250+206:13 INDENT
1271−201:45 glyph (
1251+206:13 lit %.y
1272−201:46 tight name unit
1252+206:17 glyph (
1273−201:51 tvar C
1253+206:18 tight name levy
1274−201:52 tight glyph )
1254+206:23 name rest
1275−201:53 tight glyph )
1255+206:28 name predicate
1276−201:54 tight glyph ]
1256+206:37 tight glyph )
1277−202:3 INDENT
1257+207:13 NEWLINE
1278−202:3 glyph ?-
1258+207:13 lit %.n
1279−202:6 name args
1259+207:17 lit %.n
1280−203:5 INDENT
1260+209:1 DEDENT
1281−203:5 glyph [
1261+209:1 DEDENT
1282−203:6 tight name first
1262+209:1 DEDENT
1283−203:12 name second
1263+209:1 DEDENT
1284−203:19 name combine
1264+209:1 DEDENT
1285−203:26 tight glyph ]
1265+209:1 DEDENT
1286−203:28 glyph ^-
1266+209:1 NEWLINE
1287−203:31 glyph (
1267+209:1 glyph ++
1288−203:32 tight name unit
1268+209:4 name lien
1289−203:37 tvar C
1269+209:9 glyph |=
1290−203:38 tight glyph )
1270+209:12 name args
1291−204:7 INDENT
1271+209:16 tight glyph =
1292−204:7 glyph ?-
1272+209:17 tight glyph [
1293−204:10 name first
1273+209:18 tight glyph (
1294−205:9 INDENT
1274+209:19 tight name list
1295−205:9 lit ~
1275+209:24 tvar A
1296−205:11 lit ~
1276+209:25 tight glyph )
1297−206:9 NEWLINE
1277+209:27 glyph $-(
1298−206:9 glyph [
1278+209:30 tight tvar A
1299−206:10 tight lit ~
1279+209:32 glyph ?
1300−206:12 name a
1280+209:33 tight glyph )
1301−206:13 tight glyph ]
1281+209:34 tight glyph ]
1302−207:11 INDENT
1282+210:3 INDENT
1303−207:11 glyph ?-
1283+210:3 glyph ?-
1304−207:14 name second
1284+210:6 name args
1305−208:13 INDENT
1285+211:5 INDENT
1306−208:13 lit ~
1286+211:5 glyph [
1307−208:15 lit ~
1287+211:6 tight name xs
1308−209:13 NEWLINE
1288+211:9 name predicate
1309−209:13 glyph [
1289+211:18 tight glyph ]
1310−209:14 tight lit ~
1290+212:7 INDENT
1311−209:16 name b
1291+212:7 glyph ?-
1312−209:17 tight glyph ]
1292+212:10 name xs
1313−209:19 glyph (
1293+213:9 INDENT
1314−209:20 tight name combine
1294+213:9 lit ~
1315−209:28 name a
1295+213:11 lit %.n
1316−209:30 name b
1296+214:9 NEWLINE
1317−209:31 tight glyph )
1297+214:9 glyph [
1318−211:1 DEDENT
1298+214:10 tight name item
1319−211:1 DEDENT
1299+214:15 name rest
1320−211:1 DEDENT
1300+214:19 tight glyph ]
1321−211:1 DEDENT
1322−211:1 DEDENT
1323−211:1 DEDENT
1324−211:1 NEWLINE
1325−211:1 glyph ++
1326−211:4 name skim
1327−211:9 glyph |=
1328−211:12 name args
1329−211:16 tight glyph =
1330−211:17 tight glyph [
1331−211:18 tight glyph (
1332−211:19 tight name list
1333−211:24 tvar A
1334−211:25 tight glyph )
1335−211:27 glyph $-(
1336−211:30 tight tvar A
1337−211:32 glyph ?
1338−211:33 tight glyph )
1339−211:34 tight glyph ]
1340−212:3 INDENT
1341−212:3 glyph ?-
1342−212:6 name args
1343−213:5 INDENT
1344−213:5 glyph [
1345−213:6 tight name xs
1346−213:9 name predicate
1347−213:18 tight glyph ]
1348−213:20 glyph ^-
1349−213:23 glyph (
1350−213:24 tight name list
1351−213:29 tvar A
1352−213:30 tight glyph )
1353−214:9 INDENT
1354−214:9 glyph ?-
1355−214:12 name xs
1356215:11 INDENT
1301215:11 INDENT
1357−215:11 lit ~
1302+215:11 glyph ?-
1358−215:13 lit ~
1303+215:14 glyph (
1359−216:11 NEWLINE
1304+215:15 tight name predicate
1360−216:11 glyph [
1305+215:25 name item
1361−216:12 tight name item
1306+215:29 tight glyph )
1362−216:17 name rest
1307+216:13 INDENT
1363−216:21 tight glyph ]
1308+216:13 lit %.y
1364−217:13 INDENT
1309+216:17 lit %.y
1365−217:13 glyph ?-
1310+217:13 NEWLINE
1366−217:16 glyph (
1311+217:13 lit %.n
1367−217:17 tight name predicate
1312+217:17 glyph (
1368−217:27 name item
1313+217:18 tight name lien
1369−217:31 tight glyph )
1314+217:23 name rest
1370−218:15 INDENT
1315+217:28 name predicate
1371−218:15 lit %.y
1316+217:37 tight glyph )
1372−218:19 glyph [
1317+219:1 DEDENT
1373−218:20 tight name item
1318+219:1 DEDENT
1374−218:25 glyph (
1319+219:1 DEDENT
1375−218:26 tight name skim
1320+219:1 DEDENT
1376−218:31 name rest
1321+219:1 DEDENT
1377−218:36 name predicate
1322+219:1 DEDENT
1378−218:45 tight glyph )
1323+219:1 NEWLINE
1379−218:46 tight glyph ]
1324+219:1 glyph ++
1380−219:15 NEWLINE
1325+219:4 name roll
1381−219:15 lit %.n
1326+219:9 glyph |=
1382−219:19 glyph (
1327+219:12 name args
1383−219:20 tight name skim
1328+219:16 tight glyph =
1384−219:25 name rest
1329+219:17 tight glyph [
1385−219:30 name predicate
1330+219:18 tight glyph (
1331+219:19 tight name list
1332+219:24 tvar A
1333+219:25 tight glyph )
1334+219:27 tvar B
1335+219:29 glyph $-(
1336+219:32 tight glyph [
1337+219:33 tight tvar A
1338+219:35 tvar B
1339+219:36 tight glyph ]
1340+219:38 tvar B
1386219:39 tight glyph )
1341219:39 tight glyph )
1387−221:1 DEDENT
1342+219:40 tight glyph ]
1388−221:1 DEDENT
1343+220:3 INDENT
1389−221:1 DEDENT
1344+220:3 glyph ?-
1390−221:1 DEDENT
1345+220:6 name args
1391−221:1 DEDENT
1346+221:5 INDENT
1392−221:1 DEDENT
1347+221:5 glyph [
1393−221:1 NEWLINE
1348+221:6 tight name xs
1394−221:1 glyph ++
1349+221:9 name start
1395−221:4 name skip
1350+221:15 name combine
1396−221:9 glyph |=
1351+221:22 tight glyph ]
1397−221:12 name args
1352+222:7 INDENT
1398−221:16 tight glyph =
1353+222:7 glyph ?-
1399−221:17 tight glyph [
1354+222:10 name xs
1400−221:18 tight glyph (
1355+223:9 INDENT
1401−221:19 tight name list
1356+223:9 lit ~
1402−221:24 tvar A
1357+223:11 name start
1403−221:25 tight glyph )
1358+224:9 NEWLINE
1404−221:27 glyph $-(
1359+224:9 glyph [
1405−221:30 tight tvar A
1360+224:10 tight name item
1406−221:32 glyph ?
1361+224:15 name rest
1407−221:33 tight glyph )
1362+224:19 tight glyph ]
1408−221:34 tight glyph ]
1363+224:21 glyph (
1409−222:3 INDENT
1364+224:22 tight name roll
1410−222:3 glyph ?-
1365+224:27 name rest
1411−222:6 name args
1366+224:32 glyph (
1412−223:5 INDENT
1367+224:33 tight name combine
1413−223:5 glyph [
1368+224:41 name item
1414−223:6 tight name xs
1369+224:46 name start
1415−223:9 name predicate
1370+224:51 tight glyph )
1416−223:18 tight glyph ]
1371+224:53 name combine
1417−223:20 glyph ^-
1372+224:60 tight glyph )
1418−223:23 glyph (
1373+226:1 DEDENT
1419−223:24 tight name list
1374+226:1 DEDENT
1420−223:29 tvar A
1375+226:1 DEDENT
1421−223:30 tight glyph )
1376+226:1 DEDENT
1422−224:9 INDENT
1377+226:1 NEWLINE
1423−224:9 glyph ?-
1378+226:1 glyph ++
1424−224:12 name xs
1379+226:4 name reel
1425−225:11 INDENT
1380+226:9 glyph |=
1426−225:11 lit ~
1381+226:12 name args
1427−225:13 lit ~
1382+226:16 tight glyph =
1428−226:11 NEWLINE
1383+226:17 tight glyph [
1429−226:11 glyph [
1384+226:18 tight glyph (
1430−226:12 tight name item
1385+226:19 tight name list
1431−226:17 name rest
1386+226:24 tvar A
1432−226:21 tight glyph ]
1387+226:25 tight glyph )
1433−227:13 INDENT
1388+226:27 tvar B
1434−227:13 glyph ?-
1389+226:29 glyph $-(
1435−227:16 glyph (
1390+226:32 tight glyph [
1436−227:17 tight name predicate
1391+226:33 tight tvar A
1437−227:27 name item
1392+226:35 tvar B
1438−227:31 tight glyph )
1393+226:36 tight glyph ]
1439−228:15 INDENT
1394+226:38 tvar B
1440−228:15 lit %.y
1395+226:39 tight glyph )
1441−228:19 glyph (
1396+226:40 tight glyph ]
1442−228:20 tight name skip
1397+227:3 INDENT
1443−228:25 name rest
1398+227:3 glyph ?-
1444−228:30 name predicate
1399+227:6 name args
1445−228:39 tight glyph )
1400+228:5 INDENT
1446−229:15 NEWLINE
1401+228:5 glyph [
1447−229:15 lit %.n
1402+228:6 tight name xs
1448−229:19 glyph [
1403+228:9 name start
1449−229:20 tight name item
1404+228:15 name combine
1450−229:25 glyph (
1405+228:22 tight glyph ]
1451−229:26 tight name skip
1406+229:7 INDENT
1452−229:31 name rest
1407+229:7 glyph ?-
1453−229:36 name predicate
1408+229:10 name xs
1454−229:45 tight glyph )
1409+230:9 INDENT
1455−229:46 tight glyph ]
1410+230:9 lit ~
1456−231:1 DEDENT
1411+230:11 name start
1457−231:1 DEDENT
1412+231:9 NEWLINE
1458−231:1 DEDENT
1413+231:9 glyph [
1459−231:1 DEDENT
1414+231:10 tight name item
1460−231:1 DEDENT
1415+231:15 name rest
1461−231:1 DEDENT
1416+231:19 tight glyph ]
1462−231:1 NEWLINE
1417+231:21 glyph (
1463−231:1 glyph ++
1418+231:22 tight name combine
1464−231:4 name levy
1419+231:30 name item
1465−231:9 glyph |=
1420+231:35 glyph (
1466−231:12 name args
1421+231:36 tight name reel
1467−231:16 tight glyph =
1422+231:41 name rest
1468−231:17 tight glyph [
1423+231:46 name start
1469−231:18 tight glyph (
1424+231:52 name combine
1470−231:19 tight name list
1425+231:59 tight glyph )
1471−231:24 tvar A
1426+231:60 tight glyph )
1472−231:25 tight glyph )
1427+233:1 DEDENT
1473−231:27 glyph $-(
1428+233:1 DEDENT
1474−231:30 tight tvar A
1429+233:1 DEDENT
1475−231:32 glyph ?
1430+233:1 DEDENT
1476−231:33 tight glyph )
1431+233:1 NEWLINE
1477−231:34 tight glyph ]
1432+233:1 glyph ++
1478−232:3 INDENT
1433+233:4 name flit
1479−232:3 glyph ^-
1434+233:9 glyph |=
1480−232:6 glyph ?
1435+233:12 name predicate
1481−233:5 INDENT
1436+233:21 tight glyph =
1482−233:5 glyph ?-
1437+233:22 tight glyph $-(
1483−233:8 name args
1438+233:25 tight tvar A
1484−234:7 INDENT
1439+233:27 glyph ?
1485−234:7 glyph [
1440+233:28 tight glyph )
1486−234:8 tight name xs
1441+234:3 INDENT
1487−234:11 name predicate
1442+234:3 glyph |=
1488−234:20 tight glyph ]
1443+234:6 name value
1489−235:9 INDENT
1444+234:11 tight glyph =
1490−235:9 glyph ?-
1445+234:12 tight tvar A
1491−235:12 name xs
1446+235:5 INDENT
1492−236:11 INDENT
1447+235:5 glyph ?-
1493−236:11 lit ~
1448+235:8 glyph (
1494−236:13 lit %.y
1449+235:9 tight name predicate
1495−237:11 NEWLINE
1450+235:19 name value
1496−237:11 glyph [
1451+235:24 tight glyph )
1497−237:12 tight name item
1452+236:7 INDENT
1498−237:17 name rest
1453+236:7 lit %.y
1499−237:21 tight glyph ]
1454+236:11 glyph `
1500−238:13 INDENT
1455+236:12 tight name value
1501−238:13 glyph ?-
1456+237:7 NEWLINE
1502−238:16 glyph (
1457+237:7 lit %.n
1503−238:17 tight name predicate
1458+237:11 lit ~
1504−238:27 name item
1459+239:1 DEDENT
1505−238:31 tight glyph )
1460+239:1 DEDENT
1506−239:15 INDENT
1461+239:1 DEDENT
1507−239:15 lit %.y
1462+239:1 NEWLINE
1508−239:19 glyph (
1463+239:1 glyph ++
1509−239:20 tight name levy
1464+239:4 name murn
1510−239:25 name rest
1465+239:9 glyph |=
1511−239:30 name predicate
1466+239:12 name args
1467+239:16 tight glyph =
1468+239:17 tight glyph [
1469+239:18 tight glyph (
1470+239:19 tight name list
1471+239:24 tvar A
1472+239:25 tight glyph )
1473+239:27 glyph $-(
1474+239:30 tight tvar A
1475+239:32 glyph (
1476+239:33 tight name unit
1477+239:38 tvar B
1512239:39 tight glyph )
1478239:39 tight glyph )
1513−240:15 NEWLINE
1479+239:40 tight glyph )
1514−240:15 lit %.n
1480+239:41 tight glyph ]
1515−240:19 lit %.n
1481+240:3 INDENT
1516−242:1 DEDENT
1482+240:3 glyph ?-
1517−242:1 DEDENT
1483+240:6 name args
1518−242:1 DEDENT
1484+241:5 INDENT
1519−242:1 DEDENT
1485+241:5 glyph [
1520−242:1 DEDENT
1486+241:6 tight name xs
1521−242:1 DEDENT
1487+241:9 name f
1522−242:1 DEDENT
1488+241:10 tight glyph ]
1523−242:1 NEWLINE
1489+242:7 INDENT
1524−242:1 glyph ++
1490+242:7 glyph ?-
1525−242:4 name lien
1491+242:10 name xs
1526−242:9 glyph |=
1492+243:9 INDENT
1527−242:12 name args
1493+243:9 lit ~
1528−242:16 tight glyph =
1494+243:11 lit ~
1529−242:17 tight glyph [
1495+244:9 NEWLINE
1530−242:18 tight glyph (
1496+244:9 glyph [
1531−242:19 tight name list
1497+244:10 tight name item
1532−242:24 tvar A
1498+244:15 name rest
1533−242:25 tight glyph )
1499+244:19 tight glyph ]
1534−242:27 glyph $-(
1500+245:11 INDENT
1535−242:30 tight tvar A
1501+245:11 glyph ?-
1536−242:32 glyph ?
1502+245:14 glyph (
1537−242:33 tight glyph )
1503+245:15 tight name f
1538−242:34 tight glyph ]
1504+245:17 name item
1539−243:3 INDENT
1505+245:21 tight glyph )
1540−243:3 glyph ^-
1506+246:13 INDENT
1541−243:6 glyph ?
1507+246:13 lit ~
1542−244:5 INDENT
1508+246:15 glyph (
1543−244:5 glyph ?-
1509+246:16 tight name murn
1544−244:8 name args
1510+246:21 name rest
1545−245:7 INDENT
1511+246:26 name f
1546−245:7 glyph [
1512+246:27 tight glyph )
1547−245:8 tight name xs
1513+247:13 NEWLINE
1548−245:11 name predicate
1514+247:13 glyph [
1549−245:20 tight glyph ]
1515+247:14 tight lit ~
1550−246:9 INDENT
1516+247:16 name value
1551−246:9 glyph ?-
1517+247:21 tight glyph ]
1552−246:12 name xs
1518+247:23 glyph [
1553−247:11 INDENT
1519+247:24 tight name value
1554−247:11 lit ~
1520+247:30 glyph (
1555−247:13 lit %.n
1521+247:31 tight name murn
1556−248:11 NEWLINE
1522+247:36 name rest
1557−248:11 glyph [
1523+247:41 name f
1558−248:12 tight name item
1524+247:42 tight glyph )
1559−248:17 name rest
1525+247:43 tight glyph ]
1560−248:21 tight glyph ]
1526+249:1 DEDENT
1561−249:13 INDENT
1527+249:1 DEDENT
1562−249:13 glyph ?-
1528+249:1 DEDENT
1563−249:16 glyph (
1529+249:1 DEDENT
1564−249:17 tight name predicate
1530+249:1 DEDENT
1565−249:27 name item
1531+249:1 DEDENT
1566−249:31 tight glyph )
1532+249:1 NEWLINE
1567−250:15 INDENT
1533+249:1 glyph ++
1568−250:15 lit %.y
1534+249:4 name join
1569−250:19 lit %.y
1535+249:9 glyph |=
1570−251:15 NEWLINE
1536+249:12 name args
1571−251:15 lit %.n
1537+249:16 tight glyph =
1572−251:19 glyph (
1538+249:17 tight glyph [
1573−251:20 tight name lien
1539+249:18 tight tvar A
1574−251:25 name rest
1540+249:20 glyph (
1575−251:30 name predicate
1541+249:21 tight name list
1576−251:39 tight glyph )
1542+249:26 tvar A
1577−253:1 DEDENT
1543+249:27 tight glyph )
1578−253:1 DEDENT
1544+249:28 tight glyph ]
1579−253:1 DEDENT
1545+250:3 INDENT
1580−253:1 DEDENT
1546+250:3 glyph ?-
1581−253:1 DEDENT
1547+250:6 name args
1582−253:1 DEDENT
1548+251:5 INDENT
1583−253:1 DEDENT
1549+251:5 glyph [
1584−253:1 NEWLINE
1550+251:6 tight name separator
1585−253:1 glyph ++
1551+251:16 name xs
1586−253:4 name roll
1552+251:18 tight glyph ]
1587−253:9 glyph |=
1553+252:7 INDENT
1588−253:12 name args
1554+252:7 glyph ?-
1589−253:16 tight glyph =
1555+252:10 name xs
1590−253:17 tight glyph [
1556+253:9 INDENT
1591−253:18 tight glyph (
1557+253:9 lit ~
1592−253:19 tight name list
1558+253:11 lit ~
1593−253:24 tvar A
1559+254:9 NEWLINE
1594−253:25 tight glyph )
1560+254:9 glyph [
1595−253:27 tvar B
1561+254:10 tight name item
1596−253:29 glyph $-(
1562+254:15 name rest
1597−253:32 tight glyph [
1563+254:19 tight glyph ]
1598−253:33 tight tvar A
1564+255:11 INDENT
1599−253:35 tvar B
1565+255:11 glyph ?-
1600−253:36 tight glyph ]
1566+255:14 name rest
1601−253:38 tvar B
1567+256:13 INDENT
1602−253:39 tight glyph )
1568+256:13 lit ~
1603−253:40 tight glyph ]
1569+256:15 glyph [
1604−254:3 INDENT
1570+256:16 tight name item
1605−254:3 glyph ?-
1571+256:21 lit ~
1606−254:6 name args
1572+256:22 tight glyph ]
1607−255:5 INDENT
1573+257:13 NEWLINE
1608−255:5 glyph [
1574+257:13 glyph [
1609−255:6 tight name xs
1575+257:14 tight name next
1610−255:9 name start
1576+257:19 name more
1611−255:15 name combine
1577+257:23 tight glyph ]
1612−255:22 tight glyph ]
1578+257:25 glyph [
1613−256:7 INDENT
1579+257:26 tight name item
1614−256:7 glyph ?-
1580+257:31 glyph [
1615−256:10 name xs
1581+257:32 tight name separator
1616−257:9 INDENT
1582+257:42 glyph (
1617−257:9 lit ~
1583+257:43 tight name join
1618−257:11 name start
1584+257:48 name separator
1619−258:9 NEWLINE
1585+257:58 name rest
1620−258:9 glyph [
1586+257:62 tight glyph )
1621−258:10 tight name item
1587+257:63 tight glyph ]
1622−258:15 name rest
1588+257:64 tight glyph ]
1623−258:19 tight glyph ]
1589+259:1 DEDENT
1624−258:21 glyph (
1590+259:1 DEDENT
1625−258:22 tight name roll
1591+259:1 DEDENT
1626−258:27 name rest
1592+259:1 DEDENT
1627−258:32 glyph (
1593+259:1 DEDENT
1628−258:33 tight name combine
1594+259:1 DEDENT
1629−258:41 name item
1595+259:1 NEWLINE
1630−258:46 name start
1596+259:1 glyph ++
1631−258:51 tight glyph )
1597+259:4 name snip
1632−258:53 name combine
1598+259:9 glyph |=
1633−258:60 tight glyph )
1599+259:12 name xs
1634−260:1 DEDENT
1600+259:14 tight glyph =
1635−260:1 DEDENT
1601+259:15 tight glyph (
1636−260:1 DEDENT
1602+259:16 tight name list
1637−260:1 DEDENT
1603+259:21 tvar A
1638−260:1 NEWLINE
1604+259:22 tight glyph )
1639−260:1 glyph ++
1605+260:3 INDENT
1640−260:4 name reel
1606+260:3 glyph ?-
1641−260:9 glyph |=
1607+260:6 name xs
1642−260:12 name args
1608+261:5 INDENT
1643−260:16 tight glyph =
1609+261:5 lit ~
1644−260:17 tight glyph [
1610+261:7 lit ~
1645−260:18 tight glyph (
1611+262:5 NEWLINE
1646−260:19 tight name list
1647−260:24 tvar A
1648−260:25 tight glyph )
1649−260:27 tvar B
1650−260:29 glyph $-(
1651−260:32 tight glyph [
1652−260:33 tight tvar A
1653−260:35 tvar B
1654−260:36 tight glyph ]
1655−260:38 tvar B
1656−260:39 tight glyph )
1657−260:40 tight glyph ]
1658−261:3 INDENT
1659−261:3 glyph ?-
1660−261:6 name args
1661−262:5 INDENT
1662262:5 glyph [
1612262:5 glyph [
1663−262:6 tight name xs
1613+262:6 tight name item
1664−262:9 name start
1614+262:11 name rest
1665−262:15 name combine
1615+262:15 tight glyph ]
1666−262:22 tight glyph ]
1667263:7 INDENT
1616263:7 INDENT
1668263:7 glyph ?-
1617263:7 glyph ?-
1669−263:10 name xs
1618+263:10 name rest
1670264:9 INDENT
1619264:9 INDENT
1671264:9 lit ~
1620264:9 lit ~
1672−264:11 name start
1621+264:11 lit ~
1673265:9 NEWLINE
1622265:9 NEWLINE
1674265:9 glyph [
1623265:9 glyph [
1675−265:10 tight name item
1624+265:10 tight name next
1676−265:15 name rest
1625+265:15 name more
1677265:19 tight glyph ]
1626265:19 tight glyph ]
1678−265:21 glyph (
1627+265:21 glyph [
1679−265:22 tight name combine
1628+265:22 tight name item
1680−265:30 name item
1629+265:27 glyph (
1681−265:35 glyph (
1630+265:28 tight name snip
1682−265:36 tight name reel
1631+265:33 name rest
1683−265:41 name rest
1632+265:37 tight glyph )
1684−265:46 name start
1633+265:38 tight glyph ]
1685−265:52 name combine
1686−265:59 tight glyph )
1687−265:60 tight glyph )
1688267:1 DEDENT
1634267:1 DEDENT
1689267:1 DEDENT
1635267:1 DEDENT
1690267:1 DEDENT
1636267:1 DEDENT
1691267:1 DEDENT
1637267:1 DEDENT
1692267:1 NEWLINE
1638267:1 NEWLINE
1693267:1 glyph ++
1639267:1 glyph ++
1694−267:4 name flit
1640+267:4 name rear
1695267:9 glyph |=
1641267:9 glyph |=
1696−267:12 name predicate
1642+267:12 name xs
1697−267:21 tight glyph =
1643+267:14 tight glyph =
1698−267:22 tight glyph $-(
1644+267:15 tight glyph (
1699−267:25 tight tvar A
1645+267:16 tight name list
1700−267:27 glyph ?
1646+267:21 tvar A
1701−267:28 tight glyph )
1647+267:22 tight glyph )
1702268:3 INDENT
1648268:3 INDENT
1703−268:3 glyph |=
1649+268:3 glyph ?-
1704−268:6 name value
1650+268:6 name xs
1705−268:11 tight glyph =
1706−268:12 tight tvar A
1707269:5 INDENT
1651269:5 INDENT
1708−269:5 glyph ^-
1652+269:5 lit ~
1709−269:8 glyph (
1653+269:7 glyph !!
1710−269:9 tight name unit
1654+270:5 NEWLINE
1711−269:14 tvar A
1655+270:5 glyph [
1712−269:15 tight glyph )
1656+270:6 tight name item
1713−270:7 INDENT
1657+270:11 name rest
1714−270:7 glyph ?-
1658+270:15 tight glyph ]
1715−270:10 glyph (
1659+271:7 INDENT
1716−270:11 tight name predicate
1660+271:7 glyph ?-
1717−270:21 name value
1661+271:10 name rest
1718−270:26 tight glyph )
1662+272:9 INDENT
1719−271:9 INDENT
1663+272:9 lit ~
1720−271:9 lit %.y
1664+272:11 name item
1721−271:13 glyph `
1665+273:9 NEWLINE
1722−271:14 tight name value
1666+273:9 glyph [
1723−272:9 NEWLINE
1667+273:10 tight name next
1724−272:9 lit %.n
1668+273:15 name more
1725−272:13 lit ~
1669+273:19 tight glyph ]
1726−274:1 DEDENT
1670+273:21 glyph (
1727−274:1 DEDENT
1671+273:22 tight name rear
1728−274:1 DEDENT
1672+273:27 name rest
1729−274:1 DEDENT
1673+273:31 tight glyph )
1730−274:1 NEWLINE
1674+273:32 DEDENT
1731−274:1 glyph ++
1675+273:32 DEDENT
1732−274:4 name murn
1676+273:32 DEDENT
1733−274:9 glyph |=
1677+273:32 DEDENT
1734−274:12 name args
1678+273:32 NEWLINE
1735−274:16 tight glyph =
1736−274:17 tight glyph [
1737−274:18 tight glyph (
1738−274:19 tight name list
1739−274:24 tvar A
1740−274:25 tight glyph )
1741−274:27 glyph $-(
1742−274:30 tight tvar A
1743−274:32 glyph (
1744−274:33 tight name unit
1745−274:38 tvar B
1746−274:39 tight glyph )
1747−274:40 tight glyph )
1748−274:41 tight glyph ]
1749−275:3 INDENT
1750−275:3 glyph ?-
1751−275:6 name args
1752−276:5 INDENT
1753−276:5 glyph [
1754−276:6 tight name xs
1755−276:9 name f
1756−276:10 tight glyph ]
1757−276:12 glyph ^-
1758−276:15 glyph (
1759−276:16 tight name list
1760−276:21 tvar B
1761−276:22 tight glyph )
1762−277:9 INDENT
1763−277:9 glyph ?-
1764−277:12 name xs
1765−278:11 INDENT
1766−278:11 lit ~
1767−278:13 lit ~
1768−279:11 NEWLINE
1769−279:11 glyph [
1770−279:12 tight name item
1771−279:17 name rest
1772−279:21 tight glyph ]
1773−280:13 INDENT
1774−280:13 glyph ?-
1775−280:16 glyph (
1776−280:17 tight name f
1777−280:19 name item
1778−280:23 tight glyph )
1779−281:15 INDENT
1780−281:15 lit ~
1781−281:17 glyph (
1782−281:18 tight name murn
1783−281:23 name rest
1784−281:28 name f
1785−281:29 tight glyph )
1786−282:15 NEWLINE
1787−282:15 glyph [
1788−282:16 tight lit ~
1789−282:18 name value
1790−282:23 tight glyph ]
1791−282:25 glyph [
1792−282:26 tight name value
1793−282:32 glyph (
1794−282:33 tight name murn
1795−282:38 name rest
1796−282:43 name f
1797−282:44 tight glyph )
1798−282:45 tight glyph ]
1799−284:1 DEDENT
1800−284:1 DEDENT
1801−284:1 DEDENT
1802−284:1 DEDENT
1803−284:1 DEDENT
1804−284:1 DEDENT
1805−284:1 NEWLINE
1806−284:1 glyph ++
1807−284:4 name join
1808−284:9 glyph |=
1809−284:12 name args
1810−284:16 tight glyph =
1811−284:17 tight glyph [
1812−284:18 tight tvar A
1813−284:20 glyph (
1814−284:21 tight name list
1815−284:26 tvar A
1816−284:27 tight glyph )
1817−284:28 tight glyph ]
1818−285:3 INDENT
1819−285:3 glyph ?-
1820−285:6 name args
1821−286:5 INDENT
1822−286:5 glyph [
1823−286:6 tight name separator
1824−286:16 name xs
1825−286:18 tight glyph ]
1826−286:20 glyph ^-
1827−286:23 glyph (
1828−286:24 tight name list
1829−286:29 tvar A
1830−286:30 tight glyph )
1831−287:9 INDENT
1832−287:9 glyph ?-
1833−287:12 name xs
1834−288:11 INDENT
1835−288:11 lit ~
1836−288:13 lit ~
1837−289:11 NEWLINE
1838−289:11 glyph [
1839−289:12 tight name item
1840−289:17 name rest
1841−289:21 tight glyph ]
1842−290:13 INDENT
1843−290:13 glyph ?-
1844−290:16 name rest
1845−291:15 INDENT
1846−291:15 lit ~
1847−291:17 glyph [
1848−291:18 tight name item
1849−291:23 lit ~
1850−291:24 tight glyph ]
1851−292:15 NEWLINE
1852−292:15 glyph [
1853−292:16 tight name next
1854−292:21 name more
1855−292:25 tight glyph ]
1856−292:27 glyph [
1857−292:28 tight name item
1858−292:33 glyph [
1859−292:34 tight name separator
1860−292:44 glyph (
1861−292:45 tight name join
1862−292:50 name separator
1863−292:60 name rest
1864−292:64 tight glyph )
1865−292:65 tight glyph ]
1866−292:66 tight glyph ]
1867−294:1 DEDENT
1868−294:1 DEDENT
1869−294:1 DEDENT
1870−294:1 DEDENT
1871−294:1 DEDENT
1872−294:1 DEDENT
1873−294:1 NEWLINE
1874−294:1 glyph ++
1875−294:4 name snip
1876−294:9 glyph |=
1877−294:12 name xs
1878−294:14 tight glyph =
1879−294:15 tight glyph (
1880−294:16 tight name list
1881−294:21 tvar A
1882−294:22 tight glyph )
1883−295:3 INDENT
1884−295:3 glyph ^-
1885−295:6 glyph (
1886−295:7 tight name list
1887−295:12 tvar A
1888−295:13 tight glyph )
1889−296:5 INDENT
1890−296:5 glyph ?-
1891−296:8 name xs
1892−297:7 INDENT
1893−297:7 lit ~
1894−297:9 lit ~
1895−298:7 NEWLINE
1896−298:7 glyph [
1897−298:8 tight name item
1898−298:13 name rest
1899−298:17 tight glyph ]
1900−299:9 INDENT
1901−299:9 glyph ?-
1902−299:12 name rest
1903−300:11 INDENT
1904−300:11 lit ~
1905−300:13 lit ~
1906−301:11 NEWLINE
1907−301:11 glyph [
1908−301:12 tight name next
1909−301:17 name more
1910−301:21 tight glyph ]
1911−301:23 glyph [
1912−301:24 tight name item
1913−301:29 glyph (
1914−301:30 tight name snip
1915−301:35 name rest
1916−301:39 tight glyph )
1917−301:40 tight glyph ]
1918−303:1 DEDENT
1919−303:1 DEDENT
1920−303:1 DEDENT
1921−303:1 DEDENT
1922−303:1 DEDENT
1923−303:1 NEWLINE
1924−303:1 glyph ++
1925−303:4 name rear
1926−303:9 glyph |=
1927−303:12 name xs
1928−303:14 tight glyph =
1929−303:15 tight glyph (
1930−303:16 tight name list
1931−303:21 tvar A
1932−303:22 tight glyph )
1933−304:3 INDENT
1934−304:3 glyph ?-
1935−304:6 name xs
1936−305:5 INDENT
1937−305:5 lit ~
1938−305:7 glyph !!
1939−306:5 NEWLINE
1940−306:5 glyph [
1941−306:6 tight name item
1942−306:11 name rest
1943−306:15 tight glyph ]
1944−307:7 INDENT
1945−307:7 glyph ?-
1946−307:10 name rest
1947−308:9 INDENT
1948−308:9 lit ~
1949−308:11 name item
1950−309:9 NEWLINE
1951−309:9 glyph [
1952−309:10 tight name next
1953−309:15 name more
1954−309:19 tight glyph ]
1955−309:21 glyph (
1956−309:22 tight name rear
1957−309:27 name rest
1958−309:31 tight glyph )
1959−311:1 DEDENT
1960−311:1 DEDENT
1961−311:1 DEDENT
1962−311:1 DEDENT
1963−311:1 NEWLINE
1964−311:1 glyph ++
1965−311:4 name cork
1966−311:9 glyph |=
1967−311:12 name gates
1968−311:17 tight glyph =
1969−311:18 tight glyph [
1970−311:19 tight glyph $-(
1971−311:22 tight tvar A
1972−311:24 tvar B
1973−311:25 tight glyph )
1974−311:27 glyph $-(
1975−311:30 tight tvar B
1976−311:32 tvar C
1977−311:33 tight glyph )
1978−311:34 tight glyph ]
1979−312:3 INDENT
1980−312:3 glyph ?-
1981−312:6 name gates
1982−313:5 INDENT
1983−313:5 glyph [
1984−313:6 tight name f
1985−313:8 name g
1986−313:9 tight glyph ]
1987−313:11 glyph |=
1988−313:14 name x
1989−313:15 tight glyph =
1990−313:16 tight tvar A
1991−313:18 glyph (
1992−313:19 tight name g
1993−313:21 glyph (
1994−313:22 tight name f
1995−313:24 name x
1996−313:25 tight glyph )
1997−313:26 tight glyph )
1998−315:1 DEDENT
1999−315:1 DEDENT
2000−315:1 NEWLINE
2001−315:1 glyph ++
2002−315:4 name corl
2003−315:9 glyph |=
2004−315:12 name gates
2005−315:17 tight glyph =
2006−315:18 tight glyph [
2007−315:19 tight glyph $-(
2008−315:22 tight tvar B
2009−315:24 tvar C
2010−315:25 tight glyph )
2011−315:27 glyph $-(
2012−315:30 tight tvar A
2013−315:32 tvar B
2014−315:33 tight glyph )
2015−315:34 tight glyph ]
2016−316:3 INDENT
2017−316:3 glyph ?-
2018−316:6 name gates
2019−317:5 INDENT
2020−317:5 glyph [
2021−317:6 tight name f
2022−317:8 name g
2023−317:9 tight glyph ]
2024−317:11 glyph |=
2025−317:14 name x
2026−317:15 tight glyph =
2027−317:16 tight tvar A
2028−317:18 glyph (
2029−317:19 tight name f
2030−317:21 glyph (
2031−317:22 tight name g
2032−317:24 name x
2033−317:25 tight glyph )
2034−317:26 tight glyph )
2035−319:1 DEDENT
2036−319:1 DEDENT
2037−319:1 NEWLINE
2038−319:1 glyph ++
2039−319:4 name cury
2040−319:9 glyph |=
2041−319:12 name args
2042−319:16 tight glyph =
2043−319:17 tight glyph [
2044−319:18 tight glyph $-(
2045−319:21 tight glyph [
2046−319:22 tight tvar A
2047−319:24 tvar B
2048−319:25 tight glyph ]
2049−319:27 tvar C
2050−319:28 tight glyph )
2051−319:30 tvar A
2052−319:31 tight glyph ]
2053−320:3 INDENT
2054−320:3 glyph ?-
2055−320:6 name args
2056−321:5 INDENT
2057−321:5 glyph [
2058−321:6 tight name f
2059−321:8 name a
2060−321:9 tight glyph ]
2061−321:11 glyph |=
2062−321:14 name b
2063−321:15 tight glyph =
2064−321:16 tight tvar B
2065−321:18 glyph (
2066−321:19 tight name f
2067−321:21 name a
2068−321:23 name b
2069−321:24 tight glyph )
2070−323:1 DEDENT
2071−323:1 DEDENT
2072−323:1 NEWLINE
2073−323:1 glyph ++
2074−323:4 name curr
2075−323:9 glyph |=
2076−323:12 name args
2077−323:16 tight glyph =
2078−323:17 tight glyph [
2079−323:18 tight glyph $-(
2080−323:21 tight glyph [
2081−323:22 tight tvar A
2082−323:24 tvar B
2083−323:25 tight glyph ]
2084−323:27 tvar C
2085−323:28 tight glyph )
2086−323:30 tvar B
2087−323:31 tight glyph ]
2088−324:3 INDENT
2089−324:3 glyph ?-
2090−324:6 name args
2091−325:5 INDENT
2092−325:5 glyph [
2093−325:6 tight name f
2094−325:8 name b
2095−325:9 tight glyph ]
2096−325:11 glyph |=
2097−325:14 name a
2098−325:15 tight glyph =
2099−325:16 tight tvar A
2100−325:18 glyph (
2101−325:19 tight name f
2102−325:21 name a
2103−325:23 name b
2104−325:24 tight glyph )
2105−327:1 DEDENT
2106−327:1 DEDENT
2107−327:1 NEWLINE
2108−327:1 glyph +$
2109−327:4 name cmd
2110−327:8 glyph |$
2111−327:11 glyph [
2112−327:12 tight tvar M
2113−327:13 tight glyph ]
2114−328:3 INDENT
2115−328:3 glyph [
2116−328:4 tight lit %poke
2117−328:10 name p
2118−328:11 tight glyph =
2119−328:12 tight name poke
2120−328:17 name reply
2121−328:22 tight glyph =
2122−328:23 tight glyph $-(
2123−328:26 tight glyph (
2124−328:27 tight name unit
2125−328:32 aura @t
2126−328:34 tight glyph )
2127−328:36 tvar M
2128−328:37 tight glyph )
2129−328:38 tight glyph ]
2130−329:3 NEWLINE
2131−329:3 glyph [
2132−329:4 tight lit %go
2133−329:8 name url
2134−329:11 tight glyph =
2135−329:12 tight aura @t
2136−329:14 tight glyph ]
2137−330:3 NEWLINE
2138−330:3 glyph [
2139−330:4 tight lit %wait
2140−330:10 name gap
2141−330:13 tight glyph =
2142−330:14 tight aura @dr
2143−330:18 name msg
2144−330:21 tight glyph =
2145−330:22 tight tvar M
2146−330:23 tight glyph ]
2147−331:3 NEWLINE
2148−331:3 glyph [
2149−331:4 tight lit %now
2150−331:9 name reply
2151−331:14 tight glyph =
2152−331:15 tight glyph $-(
2153−331:18 tight aura @da
2154−331:22 tvar M
2155−331:23 tight glyph )
2156−331:24 tight glyph ]
2157−332:3 NEWLINE
2158−332:3 glyph [
2159−332:4 tight lit %who
2160−332:9 name reply
2161−332:14 tight glyph =
2162−332:15 tight glyph $-(
2163−332:18 tight aura @p
2164−332:21 tvar M
2165−332:22 tight glyph )
2166−332:23 tight glyph ]
2167−334:1 DEDENT
2168−334:1 NEWLINE
2169−334:1 glyph ++
2170−334:4 name gth
2171−334:8 glyph |=
2172−334:11 name args
2173−334:15 tight glyph =
2174−334:16 tight glyph [
2175−334:17 tight tvar A
2176−334:19 tvar A
2177−334:20 tight glyph ]
2178−334:22 glyph (
2179−334:23 tight wing gth-atom.internal
2180−334:41 name args
2181−334:45 tight glyph )
2182−335:1 NEWLINE
2183−335:1 glyph ++
2184−335:4 name add
2185−335:8 glyph |=
2186−335:11 name args
2187−335:15 tight glyph =
2188−335:16 tight glyph [
2189−335:17 tight tvar A
2190−335:19 tvar A
2191−335:20 tight glyph ]
2192−335:22 glyph (
2193−335:23 tight wing add-atom.internal
2194−335:41 name args
2195−335:45 tight glyph )
2196−336:1 NEWLINE
2197−336:1 glyph ++
2198−336:4 name dec
2199−336:8 glyph |=
2200−336:11 name atom
2201−336:15 tight glyph =
2202−336:16 tight tvar A
2203−336:18 glyph (
2204−336:19 tight wing dec-atom.internal
2205−336:37 name atom
2206−336:41 tight glyph )
2207−338:1 NEWLINE
2208−338:1 glyph +$
2209−338:4 name ask
2210−338:8 glyph |$
2211−338:11 glyph [
2212−338:12 tight tvar M
2213−338:13 tight glyph ]
2214−338:15 glyph (
2215−338:16 tight wing ask.internal
2216−338:29 tvar M
2217−338:30 tight glyph )
2218−339:1 NEWLINE
2219−339:1 glyph ++
2220−339:4 name pure
2221−339:9 glyph |=
2222−339:12 name x
2223−339:13 tight glyph =
2224−339:14 tight tvar M
2225−339:16 glyph ^-
2226−339:19 glyph (
2227−339:20 tight name ask
2228−339:24 tvar M
2229−339:25 tight glyph )
2230−339:27 glyph [
2231−339:28 tight lit %pure
2232−339:34 name x
2233−339:35 tight glyph ]
2234−339:36 NEWLINE
tests/golden/prelude-unit-list-transforms/tree.txt+717−960

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/types.txt+7−22

This diff is too big to show here.

tests/golden/types-arithmetic-combined/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-arithmetic-combined/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-arithmetic-combined/source.jibbdeleted−56

This diff is too big to show here.

tests/golden/types-arithmetic-combined/tokens.txtdeleted−511

This diff is too big to show here.

tests/golden/types-arithmetic-combined/tree.txtdeleted−232

This diff is too big to show here.

tests/golden/types-arithmetic-combined/types.txtdeleted−120

This diff is too big to show here.

tests/golden/types-arithmetic-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-arithmetic-generic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-arithmetic-generic/source.jibbdeleted−21

This diff is too big to show here.

tests/golden/types-arithmetic-generic/tokens.txtdeleted−206

This diff is too big to show here.

tests/golden/types-arithmetic-generic/tree.txtdeleted−93

This diff is too big to show here.

tests/golden/types-arithmetic-generic/types.txtdeleted−44

This diff is too big to show here.

tests/golden/types-arithmetic-module/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-arithmetic-module/module-trees.txtdeleted−26

This diff is too big to show here.

tests/golden/types-arithmetic-module/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-arithmetic-module/modules/ui/math.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-arithmetic-module/source.jibbdeleted−16

This diff is too big to show here.

tests/golden/types-arithmetic-module/tokens.txtdeleted−137

This diff is too big to show here.

tests/golden/types-arithmetic-module/tree.txtdeleted−63

This diff is too big to show here.

tests/golden/types-arithmetic-module/types.txtdeleted−44

This diff is too big to show here.

tests/golden/types-arithmetic-proj-qath/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-arithmetic-proj-qath/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-arithmetic-proj-qath/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-arithmetic-proj-qath/tokens.txtdeleted−351

This diff is too big to show here.

tests/golden/types-arithmetic-proj-qath/tree.txtdeleted−164

This diff is too big to show here.

tests/golden/types-arithmetic-proj-qath/types.txtdeleted−33

This diff is too big to show here.

tests/golden/types-arithmetic-scopes/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-arithmetic-scopes/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-arithmetic-scopes/source.jibbdeleted−22

This diff is too big to show here.

tests/golden/types-arithmetic-scopes/tokens.txtdeleted−221

This diff is too big to show here.

tests/golden/types-arithmetic-scopes/tree.txtdeleted−108

This diff is too big to show here.

tests/golden/types-arithmetic-scopes/types.txtdeleted−21

This diff is too big to show here.

tests/golden/types-capital-distinct/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-capital-distinct/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-capital-distinct/tokens.txtdeleted−73

This diff is too big to show here.

tests/golden/types-capital-distinct/tree.txtdeleted−33

This diff is too big to show here.

tests/golden/types-capital-distinct/types.txtdeleted−19

This diff is too big to show here.

tests/golden/types-cell-pattern-many/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-cell-pattern-many/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-cell-pattern-many/source.jibbdeleted−41

This diff is too big to show here.

tests/golden/types-cell-pattern-many/tokens.txtdeleted−315

This diff is too big to show here.

tests/golden/types-cell-pattern-many/tree.txtdeleted−144

This diff is too big to show here.

tests/golden/types-cell-pattern-many/types.txtdeleted−14

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/source.jibbdeleted−23

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/tokens.txtdeleted−168

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/tree.txtdeleted−70

This diff is too big to show here.

tests/golden/types-cell-pattern-schemes/types.txtdeleted−16

This diff is too big to show here.

tests/golden/types-cell-pattern-tail/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-cell-pattern-tail/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-cell-pattern-tail/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-cell-pattern-tail/tokens.txtdeleted−126

This diff is too big to show here.

tests/golden/types-cell-pattern-tail/tree.txtdeleted−59

This diff is too big to show here.

tests/golden/types-cell-pattern-tail/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-constructor-context/about.txtdeleted−1

This diff is too big to show here.

tests/golden/types-constructor-context/source.jibbdeleted−37

This diff is too big to show here.

tests/golden/types-constructor-context/tokens.txtdeleted−289

This diff is too big to show here.

tests/golden/types-constructor-context/tree.txtdeleted−130

This diff is too big to show here.

tests/golden/types-constructor-context/types.txtdeleted−54

This diff is too big to show here.

tests/golden/types-deferred-call-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-deferred-call-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-deferred-call-context/source.jibbdeleted−56

This diff is too big to show here.

tests/golden/types-deferred-call-context/tokens.txtdeleted−557

This diff is too big to show here.

tests/golden/types-deferred-call-context/tree.txtdeleted−272

This diff is too big to show here.

tests/golden/types-deferred-call-context/types.txtdeleted−82

This diff is too big to show here.

tests/golden/types-equal-head-disjoint/about.txtdeleted−2

This diff is too big to show here.

tests/golden/types-equal-head-disjoint/source.jibbdeleted−25

This diff is too big to show here.

tests/golden/types-equal-head-disjoint/tokens.txtdeleted−179

This diff is too big to show here.

tests/golden/types-equal-head-disjoint/tree.txtdeleted−75

This diff is too big to show here.

tests/golden/types-equal-head-disjoint/types.txtdeleted−34

This diff is too big to show here.

tests/golden/types-flag-branch-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-flag-branch-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-flag-branch-context/source.jibbdeleted−83

This diff is too big to show here.

tests/golden/types-flag-branch-context/tokens.txtdeleted−496

This diff is too big to show here.

tests/golden/types-flag-branch-context/tree.txtdeleted−244

This diff is too big to show here.

tests/golden/types-flag-branch-context/types.txtdeleted−33

This diff is too big to show here.

tests/golden/types-generic-result-context/about.txtdeleted−1

This diff is too big to show here.

tests/golden/types-generic-result-context/source.jibbdeleted−24

This diff is too big to show here.

tests/golden/types-generic-result-context/tokens.txtdeleted−233

This diff is too big to show here.

tests/golden/types-generic-result-context/tree.txtdeleted−86

This diff is too big to show here.

tests/golden/types-generic-result-context/types.txtdeleted−22

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+1−7

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+4−28

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.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-concrete/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-hole-concrete/tokens.txtdeleted−54

This diff is too big to show here.

tests/golden/types-hole-concrete/tree.txtdeleted−22

This diff is too big to show here.

tests/golden/types-hole-concrete/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-hole-generic-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-generic-mold/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-hole-generic-mold/tokens.txtdeleted−26

This diff is too big to show here.

tests/golden/types-hole-generic-mold/tree.txtdeleted−11

This diff is too big to show here.

tests/golden/types-hole-generic-mold/types.txtdeleted−6

This diff is too big to show here.

tests/golden/types-hole-local-boundary/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-local-boundary/source.jibbdeleted−16

This diff is too big to show here.

tests/golden/types-hole-local-boundary/tokens.txtdeleted−118

This diff is too big to show here.

tests/golden/types-hole-local-boundary/tree.txtdeleted−55

This diff is too big to show here.

tests/golden/types-hole-local-boundary/types.txtdeleted−17

This diff is too big to show here.

tests/golden/types-hole-module-boundary/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-module-boundary/module-trees.txtdeleted−6

This diff is too big to show here.

tests/golden/types-hole-module-boundary/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-hole-module-boundary/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-hole-module-boundary/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-hole-module-boundary/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/types-hole-module-boundary/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/types-hole-module-boundary/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-hole-named-complex/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-named-complex/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-hole-named-complex/tokens.txtdeleted−20

This diff is too big to show here.

tests/golden/types-hole-named-complex/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/types-hole-named-complex/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/source.jibbdeleted−19

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/tokens.txtdeleted−127

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/tree.txtdeleted−62

This diff is too big to show here.

tests/golden/types-hole-numeric-capture/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/tokens.txtdeleted−19

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/types-hole-unbound-mold/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-hole-unsupported/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-unsupported/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-hole-unsupported/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/types-hole-unsupported/tree.txtdeleted−7

This diff is too big to show here.

tests/golden/types-hole-unsupported/types.txtdeleted−6

This diff is too big to show here.

tests/golden/types-hole-user-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-user-generic/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-hole-user-generic/tokens.txtdeleted−71

This diff is too big to show here.

tests/golden/types-hole-user-generic/tree.txtdeleted−31

This diff is too big to show here.

tests/golden/types-hole-user-generic/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-hole-user-named/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-user-named/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-hole-user-named/tokens.txtdeleted−22

This diff is too big to show here.

tests/golden/types-hole-user-named/tree.txtdeleted−11

This diff is too big to show here.

tests/golden/types-hole-user-named/types.txtdeleted−6

This diff is too big to show here.

tests/golden/types-hole-user-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-hole-user-value/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-hole-user-value/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/types-hole-user-value/tree.txtdeleted−10

This diff is too big to show here.

tests/golden/types-hole-user-value/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/mar/duplicate.txtdeleted−5

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-import-duplicate-mark/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/imports.txtdeleted−3

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/sur/fixture.txtdeleted−6

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/tokens.txtdeleted−35

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/types-import-duplicate-sur/types.txtdeleted−5

This diff is too big to show here.

tests/golden/types-import-hoon-flags/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-hoon-flags/imports.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-hoon-flags/source.jibbdeleted−14

This diff is too big to show here.

tests/golden/types-import-hoon-flags/sur/flags.txtdeleted−7

This diff is too big to show here.

tests/golden/types-import-hoon-flags/tokens.txtdeleted−91

This diff is too big to show here.

tests/golden/types-import-hoon-flags/tree.txtdeleted−41

This diff is too big to show here.

tests/golden/types-import-hoon-flags/types.txtdeleted−24

This diff is too big to show here.

tests/golden/types-import-hoon-noun/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-hoon-noun/imports.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-hoon-noun/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-import-hoon-noun/sur/fixture.txtdeleted−6

This diff is too big to show here.

tests/golden/types-import-hoon-noun/tokens.txtdeleted−60

This diff is too big to show here.

tests/golden/types-import-hoon-noun/tree.txtdeleted−28

This diff is too big to show here.

tests/golden/types-import-hoon-noun/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-import-tlon-notes/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-import-tlon-notes/imports.txtdeleted−7

This diff is too big to show here.

tests/golden/types-import-tlon-notes/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-import-tlon-notes/sur/notes.txtdeleted−433

This diff is too big to show here.

tests/golden/types-import-tlon-notes/tokens.txtdeleted−59

This diff is too big to show here.

tests/golden/types-import-tlon-notes/tree.txtdeleted−30

This diff is too big to show here.

tests/golden/types-import-tlon-notes/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-list-branch/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-list-branch/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-list-branch/source.jibbdeleted−81

This diff is too big to show here.

tests/golden/types-list-branch/tokens.txtdeleted−521

This diff is too big to show here.

tests/golden/types-list-branch/tree.txtdeleted−237

This diff is too big to show here.

tests/golden/types-list-branch/types.txtdeleted−41

This diff is too big to show here.

tests/golden/types-list-cons/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-list-cons/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-list-cons/source.jibbdeleted−20

This diff is too big to show here.

tests/golden/types-list-cons/tokens.txtdeleted−217

This diff is too big to show here.

tests/golden/types-list-cons/tree.txtdeleted−85

This diff is too big to show here.

tests/golden/types-list-cons/types.txtdeleted−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+1−52

This diff is too big to show here.

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

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.txtdeleted−4

This diff is too big to show here.

tests/golden/types-list-open-constraints/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-list-open-constraints/source.jibbdeleted−19

This diff is too big to show here.

tests/golden/types-list-open-constraints/tokens.txtdeleted−178

This diff is too big to show here.

tests/golden/types-list-open-constraints/tree.txtdeleted−68

This diff is too big to show here.

tests/golden/types-list-open-constraints/types.txtdeleted−30

This diff is too big to show here.

tests/golden/types-list-open/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-list-open/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-list-open/source.jibbdeleted−13

This diff is too big to show here.

tests/golden/types-list-open/tokens.txtdeleted−94

This diff is too big to show here.

tests/golden/types-list-open/tree.txtdeleted−36

This diff is too big to show here.

tests/golden/types-list-open/types.txtdeleted−18

This diff is too big to show here.

tests/golden/types-list-zero-fit/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-list-zero-fit/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-list-zero-fit/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-list-zero-fit/tokens.txtdeleted−181

This diff is too big to show here.

tests/golden/types-list-zero-fit/tree.txtdeleted−91

This diff is too big to show here.

tests/golden/types-list-zero-fit/types.txtdeleted−27

This diff is too big to show here.

tests/golden/types-literal-constructor-nouns/about.txtdeleted−2

This diff is too big to show here.

tests/golden/types-literal-constructor-nouns/source.jibbdeleted−25

This diff is too big to show here.

tests/golden/types-literal-constructor-nouns/tokens.txtdeleted−177

This diff is too big to show here.

tests/golden/types-literal-constructor-nouns/tree.txtdeleted−78

This diff is too big to show here.

tests/golden/types-literal-constructor-nouns/types.txtdeleted−45

This diff is too big to show here.

tests/golden/types-local-capitals/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-capitals/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-local-capitals/source.jibbdeleted−73

This diff is too big to show here.

tests/golden/types-local-capitals/tokens.txtdeleted−473

This diff is too big to show here.

tests/golden/types-local-capitals/tree.txtdeleted−229

This diff is too big to show here.

tests/golden/types-local-capitals/types.txtdeleted−28

This diff is too big to show here.

tests/golden/types-local-recursive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-recursive/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-local-recursive/source.jibbdeleted−54

This diff is too big to show here.

tests/golden/types-local-recursive/tokens.txtdeleted−351

This diff is too big to show here.

tests/golden/types-local-recursive/tree.txtdeleted−170

This diff is too big to show here.

tests/golden/types-local-recursive/types.txtdeleted−12

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/source.jibbdeleted−54

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/tokens.txtdeleted−404

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/tree.txtdeleted−204

This diff is too big to show here.

tests/golden/types-local-scc-adversarial/types.txtdeleted−17

This diff is too big to show here.

tests/golden/types-local-scc/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-local-scc/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-local-scc/source.jibbdeleted−58

This diff is too big to show here.

tests/golden/types-local-scc/tokens.txtdeleted−434

This diff is too big to show here.

tests/golden/types-local-scc/tree.txtdeleted−214

This diff is too big to show here.

tests/golden/types-local-scc/types.txtdeleted−12

This diff is too big to show here.

tests/golden/types-loobean-singleton-source/about.txtdeleted−2

This diff is too big to show here.

tests/golden/types-loobean-singleton-source/source.jibbdeleted−22

This diff is too big to show here.

tests/golden/types-loobean-singleton-source/tokens.txtdeleted−143

This diff is too big to show here.

tests/golden/types-loobean-singleton-source/tree.txtdeleted−52

This diff is too big to show here.

tests/golden/types-loobean-singleton-source/types.txtdeleted−65

This diff is too big to show here.

tests/golden/types-loobean-union-context/about.txtdeleted−2

This diff is too big to show here.

tests/golden/types-loobean-union-context/source.jibbdeleted−28

This diff is too big to show here.

tests/golden/types-loobean-union-context/tokens.txtdeleted−136

This diff is too big to show here.

tests/golden/types-loobean-union-context/tree.txtdeleted−55

This diff is too big to show here.

tests/golden/types-loobean-union-context/types.txtdeleted−35

This diff is too big to show here.

tests/golden/types-missing-tag-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-missing-tag-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-missing-tag-context/source.jibbdeleted−17

This diff is too big to show here.

tests/golden/types-missing-tag-context/tokens.txtdeleted−98

This diff is too big to show here.

tests/golden/types-missing-tag-context/tree.txtdeleted−45

This diff is too big to show here.

tests/golden/types-missing-tag-context/types.txtdeleted−38

This diff is too big to show here.

tests/golden/types-missing-tag-imported/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-missing-tag-imported/imports.txtdeleted−2

This diff is too big to show here.

tests/golden/types-missing-tag-imported/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-missing-tag-imported/sur/fixture.txtdeleted−21

This diff is too big to show here.

tests/golden/types-missing-tag-imported/tokens.txtdeleted−43

This diff is too big to show here.

tests/golden/types-missing-tag-imported/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/types-missing-tag-imported/types.txtdeleted−12

This diff is too big to show here.

tests/golden/types-missing-tag-named/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-missing-tag-named/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-missing-tag-named/source.jibbdeleted−23

This diff is too big to show here.

tests/golden/types-missing-tag-named/tokens.txtdeleted−155

This diff is too big to show here.

tests/golden/types-missing-tag-named/tree.txtdeleted−66

This diff is too big to show here.

tests/golden/types-missing-tag-named/types.txtdeleted−66

This diff is too big to show here.

tests/golden/types-module-field-duplicate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-module-field-duplicate/module-trees.txtdeleted−6

This diff is too big to show here.

tests/golden/types-module-field-duplicate/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-module-field-duplicate/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-module-field-duplicate/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-duplicate/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-module-field-duplicate/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-module-field-duplicate/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/module-trees.txtdeleted−12

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-module-field-nonrecord/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-path/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-module-field-path/module-trees.txtdeleted−12

This diff is too big to show here.

tests/golden/types-module-field-path/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-module-field-path/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-path/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/types-module-field-path/tokens.txtdeleted−45

This diff is too big to show here.

tests/golden/types-module-field-path/tree.txtdeleted−14

This diff is too big to show here.

tests/golden/types-module-field-path/types.txtdeleted−9

This diff is too big to show here.

tests/golden/types-module-field-shadow/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-module-field-shadow/module-trees.txtdeleted−12

This diff is too big to show here.

tests/golden/types-module-field-shadow/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-module-field-shadow/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-shadow/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-module-field-shadow/tokens.txtdeleted−15

This diff is too big to show here.

tests/golden/types-module-field-shadow/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-module-field-shadow/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-multi-call/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-multi-call/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-multi-call/source.jibbdeleted−42

This diff is too big to show here.

tests/golden/types-multi-call/tokens.txtdeleted−370

This diff is too big to show here.

tests/golden/types-multi-call/tree.txtdeleted−169

This diff is too big to show here.

tests/golden/types-multi-call/types.txtdeleted−100

This diff is too big to show here.

tests/golden/types-multi-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-multi-import/module-trees.txtdeleted−16

This diff is too big to show here.

tests/golden/types-multi-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-multi-import/modules/ui/lib.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-multi-import/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-multi-import/tokens.txtdeleted−43

This diff is too big to show here.

tests/golden/types-multi-import/tree.txtdeleted−20

This diff is too big to show here.

tests/golden/types-multi-import/types.txtdeleted−17

This diff is too big to show here.

tests/golden/types-nested-missing-tag/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-nested-missing-tag/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-nested-missing-tag/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-nested-missing-tag/tokens.txtdeleted−184

This diff is too big to show here.

tests/golden/types-nested-missing-tag/tree.txtdeleted−79

This diff is too big to show here.

tests/golden/types-nested-missing-tag/types.txtdeleted−71

This diff is too big to show here.

tests/golden/types-nested-noun-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-nested-noun-context/source.jibbdeleted−35

This diff is too big to show here.

tests/golden/types-nested-noun-context/tokens.txtdeleted−363

This diff is too big to show here.

tests/golden/types-nested-noun-context/tree.txtdeleted−162

This diff is too big to show here.

tests/golden/types-nested-noun-context/types.txtdeleted−34

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/source.jibbdeleted−30

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/tokens.txtdeleted−271

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/tree.txtdeleted−136

This diff is too big to show here.

tests/golden/types-nested-shallow-preserve/types.txtdeleted−33

This diff is too big to show here.

tests/golden/types-nested-union-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-nested-union-context/source.jibbdeleted−59

This diff is too big to show here.

tests/golden/types-nested-union-context/tokens.txtdeleted−660

This diff is too big to show here.

tests/golden/types-nested-union-context/tree.txtdeleted−302

This diff is too big to show here.

tests/golden/types-nested-union-context/types.txtdeleted−49

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-pair-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-pair-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-pair-context/source.jibbdeleted−32

This diff is too big to show here.

tests/golden/types-pair-context/tokens.txtdeleted−217

This diff is too big to show here.

tests/golden/types-pair-context/tree.txtdeleted−86

This diff is too big to show here.

tests/golden/types-pair-context/types.txtdeleted−43

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/tokens.txtdeleted−108

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/tree.txtdeleted−47

This diff is too big to show here.

tests/golden/types-partial-union-nested-nouns/types.txtdeleted−25

This diff is too big to show here.

tests/golden/types-positional-faces/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-positional-faces/source.jibbdeleted−25

This diff is too big to show here.

tests/golden/types-positional-faces/tokens.txtdeleted−394

This diff is too big to show here.

tests/golden/types-positional-faces/tree.txtdeleted−197

This diff is too big to show here.

tests/golden/types-positional-faces/types.txtdeleted−42

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/source.jibbdeleted−23

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tokens.txtdeleted−201

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/tree.txtdeleted−85

This diff is too big to show here.

tests/golden/types-prelude-arithmetic/types.txtdeleted−50

This diff is too big to show here.

tests/golden/types-prelude-ask/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-ask/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-ask/source.jibbdeleted−55

This diff is too big to show here.

tests/golden/types-prelude-ask/tokens.txtdeleted−804

This diff is too big to show here.

tests/golden/types-prelude-ask/tree.txtdeleted−335

This diff is too big to show here.

tests/golden/types-prelude-ask/types.txtdeleted−41

This diff is too big to show here.

tests/golden/types-prelude-bond/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-bond/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-bond/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-prelude-bond/tokens.txtdeleted−57

This diff is too big to show here.

tests/golden/types-prelude-bond/tree.txtdeleted−30

This diff is too big to show here.

tests/golden/types-prelude-bond/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-prelude-cmd/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-cmd/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-cmd/source.jibbdeleted−21

This diff is too big to show here.

tests/golden/types-prelude-cmd/tokens.txtdeleted−285

This diff is too big to show here.

tests/golden/types-prelude-cmd/tree.txtdeleted−122

This diff is too big to show here.

tests/golden/types-prelude-cmd/types.txtdeleted−56

This diff is too big to show here.

tests/golden/types-prelude-comparison/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-comparison/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-comparison/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-prelude-comparison/tokens.txtdeleted−175

This diff is too big to show here.

tests/golden/types-prelude-comparison/tree.txtdeleted−71

This diff is too big to show here.

tests/golden/types-prelude-comparison/types.txtdeleted−31

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.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-functional/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-functional/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-prelude-functional/tokens.txtdeleted−145

This diff is too big to show here.

tests/golden/types-prelude-functional/tree.txtdeleted−65

This diff is too big to show here.

tests/golden/types-prelude-functional/types.txtdeleted−23

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/module-trees.txtdeleted−10

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/modules/ui/alias-helper.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/source.jibbdeleted−13

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/tokens.txtdeleted−146

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/tree.txtdeleted−51

This diff is too big to show here.

tests/golden/types-prelude-generic-alias/types.txtdeleted−13

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-lent/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-lent/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-lent/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-prelude-lent/tokens.txtdeleted−76

This diff is too big to show here.

tests/golden/types-prelude-lent/tree.txtdeleted−38

This diff is too big to show here.

tests/golden/types-prelude-lent/types.txtdeleted−15

This diff is too big to show here.

tests/golden/types-prelude-like/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-like/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-like/source.jibbdeleted−22

This diff is too big to show here.

tests/golden/types-prelude-like/tokens.txtdeleted−320

This diff is too big to show here.

tests/golden/types-prelude-like/tree.txtdeleted−163

This diff is too big to show here.

tests/golden/types-prelude-like/types.txtdeleted−18

This diff is too big to show here.

tests/golden/types-prelude-list-alias/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-list-alias/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-list-alias/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/types-prelude-list-alias/tokens.txtdeleted−68

This diff is too big to show here.

tests/golden/types-prelude-list-alias/tree.txtdeleted−30

This diff is too big to show here.

tests/golden/types-prelude-list-alias/types.txtdeleted−14

This diff is too big to show here.

tests/golden/types-prelude-list-functions/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-list-functions/module-trees.txtdeleted−11

This diff is too big to show here.

tests/golden/types-prelude-list-functions/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-list-functions/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-prelude-list-functions/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-prelude-list-functions/tokens.txtdeleted−183

This diff is too big to show here.

tests/golden/types-prelude-list-functions/tree.txtdeleted−87

This diff is too big to show here.

tests/golden/types-prelude-list-functions/types.txtdeleted−28

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/source.jibbdeleted−15

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/tokens.txtdeleted−182

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/tree.txtdeleted−98

This diff is too big to show here.

tests/golden/types-prelude-list-helpers/types.txtdeleted−34

This diff is too big to show here.

tests/golden/types-prelude-predicates/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-predicates/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-predicates/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-prelude-predicates/tokens.txtdeleted−91

This diff is too big to show here.

tests/golden/types-prelude-predicates/tree.txtdeleted−49

This diff is too big to show here.

tests/golden/types-prelude-predicates/types.txtdeleted−19

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/source.jibbdeleted−20

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/tokens.txtdeleted−211

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/tree.txtdeleted−100

This diff is too big to show here.

tests/golden/types-prelude-sub-nested/types.txtdeleted−27

This diff is too big to show here.

tests/golden/types-prelude-sub/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-sub/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-sub/source.jibbdeleted−37

This diff is too big to show here.

tests/golden/types-prelude-sub/tokens.txtdeleted−380

This diff is too big to show here.

tests/golden/types-prelude-sub/tree.txtdeleted−164

This diff is too big to show here.

tests/golden/types-prelude-sub/types.txtdeleted−32

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/source.jibbdeleted−15

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tokens.txtdeleted−209

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/tree.txtdeleted−115

This diff is too big to show here.

tests/golden/types-prelude-unit-helpers/types.txtdeleted−26

This diff is too big to show here.

tests/golden/types-prelude-zing/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-prelude-zing/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-zing/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-prelude-zing/tokens.txtdeleted−92

This diff is too big to show here.

tests/golden/types-prelude-zing/tree.txtdeleted−43

This diff is too big to show here.

tests/golden/types-prelude-zing/types.txtdeleted−13

This diff is too big to show here.

tests/golden/types-proj-explicit-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-explicit-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-explicit-context/source.jibbdeleted−35

This diff is too big to show here.

tests/golden/types-proj-explicit-context/tokens.txtdeleted−626

This diff is too big to show here.

tests/golden/types-proj-explicit-context/tree.txtdeleted−287

This diff is too big to show here.

tests/golden/types-proj-explicit-context/types.txtdeleted−31

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/tokens.txtdeleted−119

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/tree.txtdeleted−56

This diff is too big to show here.

tests/golden/types-proj-nested-no-implicit/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/module-trees.txtdeleted−10

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-imported-definition/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/module-trees.txtdeleted−6

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/modules/ui/lib.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-jibb-import/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/tokens.txtdeleted−10

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/types-proj-reserved-local-mold/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-local/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-local/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-local/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-local/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/types-proj-reserved-local/tree.txtdeleted−8

This diff is too big to show here.

tests/golden/types-proj-reserved-local/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/tokens.txtdeleted−7

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-mark-import/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-mold/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/tree.txtdeleted−11

This diff is too big to show here.

tests/golden/types-proj-reserved-pattern/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/tokens.txtdeleted−70

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/tree.txtdeleted−31

This diff is too big to show here.

tests/golden/types-proj-reserved-positive/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/types-proj-reserved-sample/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/tokens.txtdeleted−7

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-proj-reserved-sur-import/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/tokens.txtdeleted−38

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/tree.txtdeleted−18

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-pattern/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/tokens.txtdeleted−25

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-sample/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/tokens.txtdeleted−31

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-proj-reserved-unused-value/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-value/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-reserved-value/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-reserved-value/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-proj-reserved-value/tokens.txtdeleted−12

This diff is too big to show here.

tests/golden/types-proj-reserved-value/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-proj-reserved-value/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/tokens.txtdeleted−23

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-proj-single-duplicate/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-proj-single-field/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-single-field/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-single-field/source.jibbdeleted−25

This diff is too big to show here.

tests/golden/types-proj-single-field/tokens.txtdeleted−499

This diff is too big to show here.

tests/golden/types-proj-single-field/tree.txtdeleted−243

This diff is too big to show here.

tests/golden/types-proj-single-field/types.txtdeleted−31

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/source.jibbdeleted−22

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/tokens.txtdeleted−210

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/tree.txtdeleted−117

This diff is too big to show here.

tests/golden/types-proj-single-sample-face/types.txtdeleted−9

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/source.jibbdeleted−26

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/tokens.txtdeleted−208

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/tree.txtdeleted−107

This diff is too big to show here.

tests/golden/types-proj-single-wrapped/types.txtdeleted−5

This diff is too big to show here.

tests/golden/types-qath-faces/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-qath-faces/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-qath-faces/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-qath-faces/tokens.txtdeleted−130

This diff is too big to show here.

tests/golden/types-qath-faces/tree.txtdeleted−59

This diff is too big to show here.

tests/golden/types-qath-faces/types.txtdeleted−18

This diff is too big to show here.

tests/golden/types-qath-holes/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-qath-holes/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-qath-holes/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-qath-holes/tokens.txtdeleted−178

This diff is too big to show here.

tests/golden/types-qath-holes/tree.txtdeleted−78

This diff is too big to show here.

tests/golden/types-qath-holes/types.txtdeleted−22

This diff is too big to show here.

tests/golden/types-qath-module-identity/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-qath-module-identity/module-trees.txtdeleted−44

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules.txtdeleted−3

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules/ui/mid.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules/ui/one.jibbdeleted−7

This diff is too big to show here.

tests/golden/types-qath-module-identity/modules/ui/two.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-qath-module-identity/source.jibbdeleted−15

This diff is too big to show here.

tests/golden/types-qath-module-identity/tokens.txtdeleted−171

This diff is too big to show here.

tests/golden/types-qath-module-identity/tree.txtdeleted−70

This diff is too big to show here.

tests/golden/types-qath-module-identity/types.txtdeleted−18

This diff is too big to show here.

tests/golden/types-qath-recursive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-qath-recursive/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-qath-recursive/source.jibbdeleted−19

This diff is too big to show here.

tests/golden/types-qath-recursive/tokens.txtdeleted−145

This diff is too big to show here.

tests/golden/types-qath-recursive/tree.txtdeleted−63

This diff is too big to show here.

tests/golden/types-qath-recursive/types.txtdeleted−14

This diff is too big to show here.

tests/golden/types-record-cast-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-cast-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-record-cast-context/source.jibbdeleted−24

This diff is too big to show here.

tests/golden/types-record-cast-context/tokens.txtdeleted−234

This diff is too big to show here.

tests/golden/types-record-cast-context/tree.txtdeleted−105

This diff is too big to show here.

tests/golden/types-record-cast-context/types.txtdeleted−49

This diff is too big to show here.

tests/golden/types-record-change-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-change-generic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-record-change-generic/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/types-record-change-generic/tokens.txtdeleted−145

This diff is too big to show here.

tests/golden/types-record-change-generic/tree.txtdeleted−57

This diff is too big to show here.

tests/golden/types-record-change-generic/types.txtdeleted−14

This diff is too big to show here.

tests/golden/types-record-change/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-change/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-record-change/source.jibbdeleted−19

This diff is too big to show here.

tests/golden/types-record-change/tokens.txtdeleted−254

This diff is too big to show here.

tests/golden/types-record-change/tree.txtdeleted−99

This diff is too big to show here.

tests/golden/types-record-change/types.txtdeleted−42

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/tokens.txtdeleted−51

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/tree.txtdeleted−22

This diff is too big to show here.

tests/golden/types-record-field-edit-separate/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/tokens.txtdeleted−22

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/types-record-field-expr-duplicate/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/tokens.txtdeleted−25

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/tree.txtdeleted−11

This diff is too big to show here.

tests/golden/types-record-field-expr-separate/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/module-trees.txtdeleted−7

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-record-field-module-reachable/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-record-field-module-unused/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-module-unused/module-trees.txtdeleted−10

This diff is too big to show here.

tests/golden/types-record-field-module-unused/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-module-unused/modules/ui/good.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-record-field-module-unused/modules/ui/unused.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-module-unused/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-module-unused/tokens.txtdeleted−11

This diff is too big to show here.

tests/golden/types-record-field-module-unused/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-record-field-module-unused/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/tokens.txtdeleted−22

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/types-record-field-nested-mold/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/tokens.txtdeleted−26

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-record-field-outer-inner/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/source.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/tokens.txtdeleted−13

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/tree.txtdeleted−7

This diff is too big to show here.

tests/golden/types-record-field-sample-duplicate/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/tokens.txtdeleted−33

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-record-field-separate-molds/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/tokens.txtdeleted−15

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-record-field-unused-mold/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/tokens.txtdeleted−90

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/tree.txtdeleted−45

This diff is too big to show here.

tests/golden/types-recursion-scc-failures/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/tokens.txtdeleted−91

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/tree.txtdeleted−42

This diff is too big to show here.

tests/golden/types-recursion-scc-groups/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/module-trees.txtdeleted−16

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/modules/ui/lib.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/tokens.txtdeleted−14

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/types-recursion-scc-import-bad/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-recursion-scc-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-import/module-trees.txtdeleted−12

This diff is too big to show here.

tests/golden/types-recursion-scc-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-import/modules/ui/lib.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-recursion-scc-import/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-recursion-scc-import/tokens.txtdeleted−25

This diff is too big to show here.

tests/golden/types-recursion-scc-import/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-recursion-scc-import/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-recursion-scc-local/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-local/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-local/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/types-recursion-scc-local/tokens.txtdeleted−80

This diff is too big to show here.

tests/golden/types-recursion-scc-local/tree.txtdeleted−39

This diff is too big to show here.

tests/golden/types-recursion-scc-local/types.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-order/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-order/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-order/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-order/tokens.txtdeleted−33

This diff is too big to show here.

tests/golden/types-recursion-scc-order/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-recursion-scc-order/types.txtdeleted−5

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/tokens.txtdeleted−30

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-recursion-scc-shadow/types.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursive-branch/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursive-branch/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-recursive-branch/source.jibbdeleted−103

This diff is too big to show here.

tests/golden/types-recursive-branch/tokens.txtdeleted−573

This diff is too big to show here.

tests/golden/types-recursive-branch/tree.txtdeleted−306

This diff is too big to show here.

tests/golden/types-recursive-branch/types.txtdeleted−50

This diff is too big to show here.

tests/golden/types-recursive-gate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursive-gate/source.jibbdeleted−55

This diff is too big to show here.

tests/golden/types-recursive-gate/tokens.txtdeleted−355

This diff is too big to show here.

tests/golden/types-recursive-gate/tree.txtdeleted−176

This diff is too big to show here.

tests/golden/types-recursive-gate/types.txtdeleted−42

This diff is too big to show here.

tests/golden/types-recursive-sample/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-recursive-sample/source.jibbdeleted−40

This diff is too big to show here.

tests/golden/types-recursive-sample/tokens.txtdeleted−344

This diff is too big to show here.

tests/golden/types-recursive-sample/tree.txtdeleted−161

This diff is too big to show here.

tests/golden/types-recursive-sample/types.txtdeleted−40

This diff is too big to show here.

tests/golden/types-request-normal/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-request-normal/mar/full.txtdeleted−5

This diff is too big to show here.

tests/golden/types-request-normal/marks.txtdeleted−1

This diff is too big to show here.

tests/golden/types-request-normal/module-trees.txtdeleted−5

This diff is too big to show here.

tests/golden/types-request-normal/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-request-normal/modules/ui/api/demo.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-request-normal/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/types-request-normal/tokens.txtdeleted−95

This diff is too big to show here.

tests/golden/types-request-normal/tree.txtdeleted−50

This diff is too big to show here.

tests/golden/types-request-normal/types.txtdeleted−26

This diff is too big to show here.

tests/golden/types-scope-library-poke/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-scope-library-poke/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-library-poke/path.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-library-poke/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-scope-library-poke/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/types-scope-library-poke/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-scope-library-poke/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-scope-root-api/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-scope-root-api/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-root-api/path.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-root-api/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-scope-root-api/tokens.txtdeleted−7

This diff is too big to show here.

tests/golden/types-scope-root-api/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-scope-root-api/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/path.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/tokens.txtdeleted−16

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-scope-store-duplicate/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-scope-store-shadow/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-scope-store-shadow/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-store-shadow/path.txtdeleted−1

This diff is too big to show here.

tests/golden/types-scope-store-shadow/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-scope-store-shadow/tokens.txtdeleted−16

This diff is too big to show here.

tests/golden/types-scope-store-shadow/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-scope-store-shadow/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-single-case-pattern/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-single-case-pattern/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-single-case-pattern/source.jibbdeleted−59

This diff is too big to show here.

tests/golden/types-single-case-pattern/tokens.txtdeleted−364

This diff is too big to show here.

tests/golden/types-single-case-pattern/tree.txtdeleted−182

This diff is too big to show here.

tests/golden/types-single-case-pattern/types.txtdeleted−32

This diff is too big to show here.

tests/golden/types-string-interpolation/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-string-interpolation/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-string-interpolation/source.jibbdeleted−28

This diff is too big to show here.

tests/golden/types-string-interpolation/tokens.txtdeleted−259

This diff is too big to show here.

tests/golden/types-string-interpolation/tree.txtdeleted−109

This diff is too big to show here.

tests/golden/types-string-interpolation/types.txtdeleted−33

This diff is too big to show here.

tests/golden/types-tuple-context-nested/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-tuple-context-nested/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-tuple-context-nested/source.jibbdeleted−24

This diff is too big to show here.

tests/golden/types-tuple-context-nested/tokens.txtdeleted−289

This diff is too big to show here.

tests/golden/types-tuple-context-nested/tree.txtdeleted−140

This diff is too big to show here.

tests/golden/types-tuple-context-nested/types.txtdeleted−49

This diff is too big to show here.

tests/golden/types-tuple-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-tuple-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-tuple-context/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/types-tuple-context/tokens.txtdeleted−109

This diff is too big to show here.

tests/golden/types-tuple-context/tree.txtdeleted−55

This diff is too big to show here.

tests/golden/types-tuple-context/types.txtdeleted−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.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-finite-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-finite-context/source.jibbdeleted−76

This diff is too big to show here.

tests/golden/types-union-finite-context/tokens.txtdeleted−529

This diff is too big to show here.

tests/golden/types-union-finite-context/tree.txtdeleted−234

This diff is too big to show here.

tests/golden/types-union-finite-context/types.txtdeleted−27

This diff is too big to show here.

tests/golden/types-union-finite-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-finite-generic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-finite-generic/source.jibbdeleted−48

This diff is too big to show here.

tests/golden/types-union-finite-generic/tokens.txtdeleted−336

This diff is too big to show here.

tests/golden/types-union-finite-generic/tree.txtdeleted−143

This diff is too big to show here.

tests/golden/types-union-finite-generic/types.txtdeleted−11

This diff is too big to show here.

tests/golden/types-union-finite-limit/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-finite-limit/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-finite-limit/source.jibbdeleted−35

This diff is too big to show here.

tests/golden/types-union-finite-limit/tokens.txtdeleted−233

This diff is too big to show here.

tests/golden/types-union-finite-limit/tree.txtdeleted−89

This diff is too big to show here.

tests/golden/types-union-finite-limit/types.txtdeleted−10

This diff is too big to show here.

tests/golden/types-union-finite/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-finite/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-finite/source.jibbdeleted−45

This diff is too big to show here.

tests/golden/types-union-finite/tokens.txtdeleted−238

This diff is too big to show here.

tests/golden/types-union-finite/tree.txtdeleted−110

This diff is too big to show here.

tests/golden/types-union-finite/types.txtdeleted−17

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/source.jibbdeleted−82

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/tokens.txtdeleted−593

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/tree.txtdeleted−257

This diff is too big to show here.

tests/golden/types-union-nonwing-subject/types.txtdeleted−45

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/source.jibbdeleted−25

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/tokens.txtdeleted−205

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/tree.txtdeleted−96

This diff is too big to show here.

tests/golden/types-union-pattern-result-context/types.txtdeleted−13

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/source.jibbdeleted−55

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/tokens.txtdeleted−357

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/tree.txtdeleted−161

This diff is too big to show here.

tests/golden/types-union-pattern-result-controls/types.txtdeleted−30

This diff is too big to show here.

tests/golden/types-union-patterns-generic/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-patterns-generic/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-patterns-generic/source.jibbdeleted−36

This diff is too big to show here.

tests/golden/types-union-patterns-generic/tokens.txtdeleted−255

This diff is too big to show here.

tests/golden/types-union-patterns-generic/tree.txtdeleted−117

This diff is too big to show here.

tests/golden/types-union-patterns-generic/types.txtdeleted−13

This diff is too big to show here.

tests/golden/types-union-patterns-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-patterns-import/module-trees.txtdeleted−8

This diff is too big to show here.

tests/golden/types-union-patterns-import/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-patterns-import/modules/ui/lib.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-patterns-import/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-union-patterns-import/tokens.txtdeleted−28

This diff is too big to show here.

tests/golden/types-union-patterns-import/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-union-patterns-import/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-union-patterns/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-patterns/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-patterns/source.jibbdeleted−74

This diff is too big to show here.

tests/golden/types-union-patterns/tokens.txtdeleted−336

This diff is too big to show here.

tests/golden/types-union-patterns/tree.txtdeleted−152

This diff is too big to show here.

tests/golden/types-union-patterns/types.txtdeleted−25

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/module-trees.txtdeleted−16

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules/ui/one.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/modules/ui/two.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/source.jibbdeleted−33

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/tokens.txtdeleted−368

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/tree.txtdeleted−152

This diff is too big to show here.

tests/golden/types-union-polymorphic-identity/types.txtdeleted−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.txtdeleted−4

This diff is too big to show here.

tests/golden/types-unit-construction/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-unit-construction/source.jibbdeleted−29

This diff is too big to show here.

tests/golden/types-unit-construction/tokens.txtdeleted−168

This diff is too big to show here.

tests/golden/types-unit-construction/tree.txtdeleted−71

This diff is too big to show here.

tests/golden/types-unit-construction/types.txtdeleted−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.txtdeleted−1

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/tokens.txtdeleted−68

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/tree.txtdeleted−32

This diff is too big to show here.

tests/golden/types-value-cycle-shadow/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/tokens.txtdeleted−45

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/tree.txtdeleted−17

This diff is too big to show here.

tests/golden/types-value-cycle-unsupported/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-value-cycles/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-value-cycles/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-value-cycles/source.jibbdeleted−13

This diff is too big to show here.

tests/golden/types-value-cycles/tokens.txtdeleted−87

This diff is too big to show here.

tests/golden/types-value-cycles/tree.txtdeleted−39

This diff is too big to show here.

tests/golden/types-value-cycles/types.txtdeleted−44

This diff is too big to show here.

tests/importer/about.txt+2−38

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+20−100

This diff is too big to show here.

tests/lib/jibb-api-evidence.hoondeleted−258

This diff is too big to show here.

tests/lib/jibb-api-paths.hoondeleted−104

This diff is too big to show here.

tests/lib/jibb-arithmetic-guards.hoondeleted−58

This diff is too big to show here.

tests/lib/jibb-ask-guards.hoondeleted−63

This diff is too big to show here.

tests/lib/jibb-bridge.hoon+2−97

This diff is too big to show here.

tests/lib/jibb-closed-gate-guards.hoondeleted−60

This diff is too big to show here.

tests/lib/jibb-constructor-fit-guards.hoondeleted−128

This diff is too big to show here.

tests/lib/jibb-direct-gate-guards.hoondeleted−172

This diff is too big to show here.

tests/lib/jibb-direct-gate-source.hoondeleted−46

This diff is too big to show here.

tests/lib/jibb-gate-free-guards.hoondeleted−79

This diff is too big to show here.

tests/lib/jibb-gate-free-source.hoondeleted−95

This diff is too big to show here.

tests/lib/jibb-generic-alias.hoondeleted−48

This diff is too big to show here.

tests/lib/jibb-generic-construction.hoondeleted−141

This diff is too big to show here.

tests/lib/jibb-generic-pattern.hoondeleted−132

This diff is too big to show here.

tests/lib/jibb-generic-recursion.hoondeleted−170

This diff is too big to show here.

tests/lib/jibb-hole-guards.hoondeleted−77

This diff is too big to show here.

tests/lib/jibb-import-default.hoondeleted−50

This diff is too big to show here.

tests/lib/jibb-import-diagnostic.hoondeleted−59

This diff is too big to show here.

tests/lib/jibb-import-overlap.hoondeleted−80

This diff is too big to show here.

tests/lib/jibb-import-structural.hoondeleted−82

This diff is too big to show here.

tests/lib/jibb-list-alias-guards.hoondeleted−27

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-nested-union-guards.hoondeleted−67

This diff is too big to show here.

tests/lib/jibb-poke-bridge.hoondeleted−88

This diff is too big to show here.

tests/lib/jibb-positional-face-guards.hoondeleted−38

This diff is too big to show here.

tests/lib/jibb-proj-guards.hoondeleted−124

This diff is too big to show here.

tests/lib/jibb-qath-fuel.hoondeleted−52

This diff is too big to show here.

tests/lib/jibb-qath-source.hoondeleted−66

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb-tlon-bridge.hoondeleted−29

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/lib/jibb.hoon+588−1561

This diff is too big to show here.

tests/type-api-evidence/about.txtdeleted−3

This diff is too big to show here.

tests/type-api-evidence/expected.txtdeleted−1

This diff is too big to show here.

tests/type-api-paths/about.txtdeleted−3

This diff is too big to show here.

tests/type-api-paths/api.txtdeleted−13

This diff is too big to show here.

tests/type-api-paths/expected.txtdeleted−18

This diff is too big to show here.

tests/type-api-paths/missing-decl.txtdeleted−12

This diff is too big to show here.

tests/type-api-paths/poke-clash.txtdeleted−12

This diff is too big to show here.

tests/type-api-paths/scry-bad.txtdeleted−13

This diff is too big to show here.

tests/type-api-paths/scry.txtdeleted−13

This diff is too big to show here.

tests/type-api-paths/todo-action.txtdeleted−6

This diff is too big to show here.

tests/type-api-paths/todo-item.txtdeleted−6

This diff is too big to show here.

tests/type-api-paths/todo-sur.txtdeleted−12

This diff is too big to show here.

tests/type-api-paths/todo-update.txtdeleted−6

This diff is too big to show here.

tests/type-api-paths/todos.txtdeleted−6

This diff is too big to show here.

tests/type-api-paths/value-clash.txtdeleted−15

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-import-default/about.txtdeleted−1

This diff is too big to show here.

tests/type-import-default/controls.txtdeleted−16

This diff is too big to show here.

tests/type-import-default/expected.txtdeleted−9

This diff is too big to show here.

tests/type-import-default/parent.txtdeleted−3

This diff is too big to show here.

tests/type-import-default/tlon.txtdeleted−18

This diff is too big to show here.

tests/type-import-diagnostic/about.txtdeleted−15

This diff is too big to show here.

tests/type-import-diagnostic/expected.txtdeleted−112

This diff is too big to show here.

tests/type-import-diagnostic/mark.txtdeleted−5

This diff is too big to show here.

tests/type-import-diagnostic/nested.txtdeleted−11

This diff is too big to show here.

tests/type-import-diagnostic/source.txtdeleted−13

This diff is too big to show here.

tests/type-import-diagnostic/sur.txtdeleted−5

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-import/about.txt+4−23

This diff is too big to show here.

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

This diff is too big to show here.

tests/type-import/source.txt−26

This diff is too big to show here.

tests/type-import/sur.txt−6

This diff is too big to show here.

tests/type-list-alias/expected.txtdeleted−36

This diff is too big to show here.

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

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.txtdeleted−7

This diff is too big to show here.

tests/type-poke/alias.txtdeleted−2

This diff is too big to show here.

tests/type-poke/api.txtdeleted−2

This diff is too big to show here.

tests/type-poke/client.txtdeleted−23

This diff is too big to show here.

tests/type-poke/direct.txtdeleted−2

This diff is too big to show here.

tests/type-poke/expected.txtdeleted−66

This diff is too big to show here.

tests/type-poke/exported.txtdeleted−9

This diff is too big to show here.

tests/type-poke/fake.txtdeleted−4

This diff is too big to show here.

tests/type-poke/impostor-client.txtdeleted−2

This diff is too big to show here.

tests/type-poke/impostor.txtdeleted−1

This diff is too big to show here.

tests/type-poke/inner.txtdeleted−2

This diff is too big to show here.

tests/type-poke/mark.txtdeleted−5

This diff is too big to show here.

tests/type-poke/public.txtdeleted−2

This diff is too big to show here.

tests/type-poke/transitive.txtdeleted−2

This diff is too big to show here.

tests/type-tlon/about.txtdeleted−6

This diff is too big to show here.

tests/type-tlon/expected.txtdeleted−6

This diff is too big to show here.

tests/type-tlon/source.txtdeleted−6

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tools/clay-fixtures−56

This diff is too big to show here.

tools/golden+2−12

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/ship+8−46

This diff is too big to show here.

tools/testdata/clay-fixtures-selftestdeleted−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+3−116

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-api-evidence-testdeleted−40

This diff is too big to show here.

tools/type-api-paths-testdeleted−52

This diff is too big to show here.

tools/type-arithmetic-guards-testdeleted−28

This diff is too big to show here.

tools/type-ask-guards-testdeleted−31

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-direct-gate-testdeleted−64

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-generic-alias-testdeleted−28

This diff is too big to show here.

tools/type-generic-construction-testdeleted−49

This diff is too big to show here.

tools/type-generic-pattern-testdeleted−52

This diff is too big to show here.

tools/type-generic-recursion-testdeleted−61

This diff is too big to show here.

tools/type-hole-guards-testdeleted−32

This diff is too big to show here.

tools/type-import-default-testdeleted−38

This diff is too big to show here.

tools/type-import-diagnostic-testdeleted−43

This diff is too big to show here.

tools/type-import-overlap-testdeleted−33

This diff is too big to show here.

tools/type-import-structural-testdeleted−36

This diff is too big to show here.

tools/type-list-alias-testdeleted−33

This diff is too big to show here.

tools/type-module-scope-test+1−2

This diff is too big to show here.

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

This diff is too big to show here.

tools/type-poke-testdeleted−50

This diff is too big to show here.

tools/type-positional-face-guards-testdeleted−29

This diff is too big to show here.

tools/type-proj-guards-testdeleted−32

This diff is too big to show here.

tools/type-qath-guards-testdeleted−31

This diff is too big to show here.

tools/type-request-guards-testdeleted−31

This diff is too big to show here.

tools/type-sub-guards-testdeleted−31

This diff is too big to show here.

tools/type-tlon-testdeleted−39

This diff is too big to show here.

tools/type-todo-api-testdeleted−62

This diff is too big to show here.

tools/type-todo-partial-testdeleted−55

This diff is too big to show here.