on 4406f6f 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-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+5−69
@@ -56,67 +56,13 @@ The core is split into chapters, `+| %name`, in this order:
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
56| `%span-check` | `+check-spans`, which `+golden` runs on every tree, and `+check-spans-test` |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
57| `%type-inference` | The initial inference fragment and its unification helpers; not yet a module type checker |
58
58
59−The inference fragment supports fixed auras, unrestricted `@`, one-way widening into it and toward aura-family ancestors, generic variables and gates, faced and unfaced cells, cell sample binders, known record field reads, a cell pattern of two or more binders, a complete two-arm loobean branch, a complete two-arm unit-shaped branch, closed local mold aliases and acyclic forward value references. For a supported single syntactic top-level recursive gate, the checker infers the sample first and uses that exact sample, including its field faces, in a monomorphic self placeholder. The completed body must unify with the placeholder before the gate is generalized; incompatible recursive arguments can report the call and argument sites. Uses of generalized top-level definitions instantiate their schemes independently. For a complete loobean branch with one direct self-call arm, the checker can infer the other arm independently and use its closed, fully resolved type to seed the recursive result; it then checks the whole body. Open or pending base types do not seed the result, and other branch shapes still depend on the existing partial inference. A supported single local recursive gate also uses a monomorphic self reference while its body is checked, then generalizes variables free of its enclosing environment; captured variables remain shared. Acyclic local value definitions can refer forward. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals, even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. Some proven non-gate value cycles are diagnosed; other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Acyclic simple local mold aliases can also refer forward, and are scoped to the body, not its gate's sample. Nonrecursive generic aliases of supported molds can be applied at exact arity, including locally and through library interfaces; their parameters are lexical. Closed, provably disjoint nonrecursive unions and tagged single-case molds support contextual term values, `~` and `|=%tag` constructors. Literal heads compare by their runtime noun, so `|=%$` can construct an explicit null-, loobean-zero- or term-zero-headed case. Equal heads with distinct payloads can be selected when exactly one payload fit is proven; unknown or ambiguous alternatives remain unsupported. Unresolved tags and nulls remain pending, with distinct partial-inference diagnostics. Nonrecursive top-level generic union molds with provably disjoint cases also support contextual tags and constructors at exact arity; their arguments are retained through generalization and supported library interfaces. Nonrecursive generic aliases can reorder, repeat or omit parameters while preserving a supported union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body and recursive molds remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample while retaining its origin, generic arguments and faces. Unnamed, pending-tag, recursive, unknown-atom and variable-bound union origins remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. A differing-variable face constraint remains unsupported. When inference forces two distinct explicitly written capitals equal, it reports both source sites; forcing a capital to a concrete type remains unsupported in this fragment. It can infer and generalize atom constraints arising from explicit capitals or bare sample binders, preserve those constraints through aliases, instantiate them independently, and print multiple constraints. Unresolved decimal variables default to `@ud` for inferred types without gates; defaulting inside gate types and other constraint cases remain incomplete. It does not yet check a module, complete imports, general patterns, general deferred constraints, recursive molds, dependency cycles or most errors with both conflicting excerpts. Definite cast and call mismatches, incompatible branches and overlapping union cases report both sites and excerpts. Concrete branch results can join at an explicitly present parent aura or `@`. Some known tuple and record positions acquire matching faces; other variable-dependent face merges, general branch tag context and ambiguous call-result propagation remain unsupported; function compatibility involving nested `@` and variable-dependent joins remain unsupported except for equal types. For a single recursive gate outside a group, the reporting path repeats inference rather than instantiating its generalized interface inside its own body; a group report uses its stored schemes. This adds work, and the current dependency pass can take quadratic time on long forward chains; the milestone's speed target remains unverified. A separate conservative pass reports unions whose cases are provably disjoint or overlapping and leaves other cases unresolved; it does not claim the mold is checked. Unsupported forms are reported as such, and the partial output says the module has not been checked.
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, 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; unresolved tags remain pending. Recursive local groups, recursive molds and generic unions remain 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, while variable-dependent face merges, tag context across branches, union type printing 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
60
61−A single-arm cell pattern can bind two or more positions, with its last binder capturing the remaining tail. Duplicate and shadowed names are rejected. A definite non-cell spine fails; an intermediate union or collection that might contain a cell remains unsupported. For a known non-union cell, a separate one-arm rule also accepts structured patterns, including nested literal and wildcard positions, when the existing coverage proof establishes the whole pattern. It binds payloads with their original types and checks result context; unknown, partially covered, union or recursive spines stay unsupported.
61+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. Explicit unions in collection arguments remain unsupported; other nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms and nested faced or unfaced cells with valid Jibb face names from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts those same shapes from declared mark imports in a separate list. 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.
62
62
63−String interpolation infers its pieces in order and preserves substitutions and pending constraints. A piece with a known atom aura, unrestricted `@`, or a tape `(list @tD)` is accepted; an isolated decimal literal takes its normal `@ud` default. A known cell reports that it needs a printer, and an explicitly generic atom asks for an aura at its use site. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported in this fragment.
63+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.
64
64
65−The Hoon bridge translates imported `*` as the any-noun type, directly or within supported nonrecursive cells. The reader may still decline a disjoint tagged union with a noun payload, and recursive imports containing `*` remain unsupported. It accepts an exact fork of the two loobean singletons as `?`, and each singleton separately as `%.y` or `%.n`, including inside supported faced cells. Contextual loobean literals specialize against a matching singleton by noun, including a proven singleton in a direct union; named loobean singletons do not silently widen to a distinct aura. Open `%f`, other values, and other forks containing loobean singletons remain unsupported; recursive Hoon molds containing flags can also fail closed.
65+`+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 and simple or nonrecursive generic mold aliases. It reserves names from the supplied prelude, detects missing sources and cycles, and rejects a dependency if its interface cannot be inferred by the fragment. API files, modules with `main`, unsupported definitions and many other features remain outside this subset; the prelude inventory itself is incomplete. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. Neither entry point claims the module has been checked.
66−
67−A bare tag that provably matches no case of a known union reports the union and tag sites. This covers casts, single-argument calls, contextual unit payloads, list items and supported branch arms, including unnamed imported unions. For syntactic tuples, ordered fit replay can identify a missing tag in a nested position; an earlier mismatch or uncertainty stops the replay instead of guessing. Existing tags whose shape or payload does not fit retain the ordinary mismatch; unresolved tags stay pending.
68−
69−A change can replace uniquely named fields on a fully known, faced record spine, including through a nested wing. Replacements receive the field type as context, substitutions and pending constraints are retained, and the resulting type remains the original record. Missing fields, empty changes and definite replacement mismatches report sites; the expected-type site is the edit, since the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A cast to a known record also supplies field context to a tuple or record initializer, including nested list and union fields. The expected-type site is the cast mold; the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer in this fragment. The complete cart-store source fails closed because store kind and declaration scope are not yet checked.
70−
71−For 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.
72−
73−Multi-argument calls form one right-nested sample: `f a b c` supplies `[a [b c]]`, with the last argument able to be a cell itself. The fragment fits the complete sample, preserving known faces and shared variables. Known sample positions can provide list or union context to arguments; unknown sample shapes use ordinary inference and some contextual forms remain unsupported. For a definite mismatch, the diagnostic points to a specific argument when it can establish which one failed; otherwise it reports the combined sample.
74−
75−A list literal can be inferred when a cast or known gate sample supplies a list type and the supplied prelude has the validated standard list definition. Empty, nonempty and nested literals work, including contextual union tags in elements; mismatched elements report the item and expected type. Imported Hoon lists share this representation. Under the same known context, `~` and zero-valued term literals fit an empty list, and a two-item unfaced cell `[head tail]` is a cons; cons cells and list literals can be nested. Mismatched heads or tails report both sites. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. Known loobean result context can propagate through supported complete branches and binder-only cell arms, with a final directional fit; a binder-only arm over a union subject remains unsupported. A known gate with an unresolved result variable can also receive an enclosing result type before its argument is inferred, for example allowing `^- (list @t) (id ~)`; unknown callees and unresolved targets retain the conservative path. A known gate sample supplies context to corresponding positions of a single tuple or record argument, including nested cells; a zero literal can therefore fit a list position. A bound zero constant still remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Uncontextualized list literals also infer with a fresh element variable, including empty and nested lists; the resulting variable can generalize. Unresolved item tags and uncertain widening remain unsupported. Faced or longer cons cells, and a missing or altered prelude list remain unsupported. For a known standard list with a supported element type, it also infers a complete two-arm branch using `~` and `[item rest]`, in either order. The binders have the element and list types and cannot shadow or duplicate names. Unknown subjects, unsupported element types, other patterns and incomplete arms remain unsupported.
76−
77−A term-headed pair such as `gap+%s2` follows the same contextual inference as `[%gap %s2]`; its synthetic head uses the pair’s span in diagnostics.
78−
79−A backtick constructs a unit when the supplied prelude has the validated standard `unit` template. Its payload is inferred normally, retaining pending literals and generic variables; nested units work and the prelude’s `some` becomes available. With ordinary result annotations, its `bind`, `biff`, `both`, `clap`, `clef` and `flit` also infer. A known unit in a cast, call, list item or record field supplies its payload context, including nested units and lists; definite mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude templates remain unsupported.
80−
81−A known union of `~` and a null-headed cell can be matched by `~` and `[~ value]` arms in either order. The payload binder is checked for shadowing. Unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported; this fragment infers the prelude’s `fall` and `need` signatures.
82−
83−A known closed union with two or more arms can be matched when each arm provably covers or excludes each remaining case. The checker first tries whole cases; when a pattern splits a case, it can expand known `?` positions into their two noun values, up to 64 alternatives across the union. Binders retain the original case type, and one arm may bind several refinements of that case. It reports missing alternatives and arms already covered, checks tags by noun value, and supports imported and generic union cases. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. When a cast or known call sample supplies a result type, a known union subject accessed by a wing, a grouped wing or a supported shallow call can propagate that context through whole-case arms and supported finite loobean refinements, including nested cell and list positions. Other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked.
84−
85−A known closed union can also provide context to each arm of a complete loobean or unit-shaped branch in a cast or a call with a known union sample. Nested branches and transparent groups work; a mismatch reports the expected union and the offending arm. General patterns and context through bodies with local definitions remain unsupported, and unrelated unresolved tags stay pending.
86−
87−The separate `jibb-dev/lib/jibb-import.hoon` is an unfinished reader for selected Hoon type graphs. It handles named recursion, nested map, set, queue, list, unit, jar and jug arguments, direct ordered maps, and direct `$^` unions whose source branches can be proved disjoint. It also recognizes a direct ordered-map call with two simple named mold operands, as in Tlon `notes.log`, after validating provenance and operand source; revisiting the same map hold fails closed. It also reads ordered map fields in records when the map arguments are syntactically fixed atom molds and other fields are fixed atom molds or standard collections of static atom molds. Collection names must not be shadowed. The reader can also import a mark door sample, removing its outer sample face and validating its build subject. For a mark whose sample is exactly a named arm of its single Ford-imported `/sur` core, it can recover a source-proved nonrecursive union, including source-location wrappers around fields; recursive or unverified fallback results remain unsupported. The reader checks explicit Hoon `$%`, `$?` and `$^` unions against the Grammar’s disjointness rule, as @iko confirmed on 2026-10-30. For an explicit `$%` with distinct literal head tags, it can also prove restricted local named payload dependencies, including bare `~` fields, re-evaluate and validate each source branch, and recover the union before Hoon collapses it. The real Tlon `notes.u-note` exercises its `[%deleted ~]` case. A bounded fallback also recovers one level of local named tagged unions inside such a union, including Tlon `notes.u-notebook` and `notes.u-notes`. Source-proved tagged unions can also be wrapped in Hoon `$~` defaults, including a downstream union using Tlon `epic.saga`; the selected source and projected branches still undergo the same provenance and disjointness checks. The tagged-source helper peels up to four consecutive default wrappers, while default wrappers encountered inside dependency proofs consume the existing semantic-node budget. A source-proved nested self-recursive union retains its named owner, including Tlon `notes.import-node`; deeper, mutually recursive or unproven cases stay unsupported. The nested source proof has a 256-visit semantic-node budget, and source-location wrapper peeling is limited to four per node; Hoon evaluation and source scans are not metered. It rejects recursive or computed dependencies, inherited same-name collisions, unsupported nested unions and proofs exceeding a shared 4,096-node budget. It re-evaluates statically recognizable source branches before Hoon can collapse them, checks materialized fork cases, and rejects shapes it cannot prove disjoint. Static records may also have verified standard-collection and `path` siblings. One direct explicit union argument in a standard list, set, map or unit is accepted when its call wrapper and collection provenance are verified and its static cases are pairwise disjoint. A synthetic regression checks that forged wrapper subjects, samples and tails are rejected. Other collection-union forms, nested ordered maps, general source-level disjointness and complete integration with the checker remain unfinished. `+golden-types-imports` can consume fixed-aura atoms, valid term singletons, Hoon's `%n` zero singleton as Jibb `~`, nested faced or unfaced cells, unions of supported, pairwise-disjoint cases, and opaque standard collections with supported arguments from caller-supplied reader results for declared `/-` imports; `+golden-types-with-marks` accepts the same shapes for declared marks. The caller must pass unchanged results from the source-aware reader: the bridge validates the supplied graph but cannot detect source cases Hoon collapsed before that graph was built. The opaque collection types retain their names and arguments for identity, unification and printing. The validated standard prelude `list` mold shares the imported list representation; other Jibb-written collection molds and most prelude collection operations remain unsupported. Other forms remain unsupported. Its disjointness proof is conservative and can reject a valid union it cannot prove disjoint. Collection recognition requires the originating `/sur` core. The reader validates direct zuse subjects and Ford subjects consisting of faced imported cores and a validated tail, checking imported cores transitively; it rejects shadowed names, inconsistent core subjects and other subject shapes. For a recursive reference, the reader matches the exact Hoon hold against named arms in validated cores, including transitive Ford imports; it rejects missing, unlabelled or ambiguous origins. Its fixtures include three real Tlon files; `tools/importer-test` compares the internal projection under eval, and the ship test compares the same golden output. `tools/type-import-test` and `tools/type-mark-test` compare bridge reports under eval and on the ship. `tools/type-tlon-test` and its ship counterpart exercise four real Tlon presence unions and a field read through the source-aware reader and partial checker. `tools/clay-fixtures` also passes Clay-built `/sur` molds and mark samples through the Clay-built importer and partial checker.
88−
89−Self-recursive `/sur` molds can cross the bridge as opaque module-and-name identities when their supported source-aware graph passes validation, including one-argument lists containing same-origin recursive references. The real Tlon `notes.import-node` reaches this bridge; it does not unfold or construct the recursive type. Aliases, foreign references, recursive marks, unfolding, construction and field access remain unsupported; the partial printer declines recursive names that are not in scope.
90−
91−The partial checker also recognizes a source-proven Jibb recursive mold consisting of `~` and one faced cell with a fixed-aura head and direct self tail. Its identity includes the defining path and name. It unfolds this shape for supported null and cell construction and for a two-arm null/cell match; static application-path literals use the verified public `qath` alias. The internal prelude defines `qath` as a transparent knot sequence and the public prelude re-exports it. Each inference attempt has 256 unfolding and static-segment steps; parsing and separate retries are not bounded by that limit. Dynamic application-path segments, broader patterns and other recursive shapes remain unsupported. Route and static-file existence checks remain milestone 4.
92−
93−Callers that have a `/sur` core and a name can use `+read-named`: it checks for a locally declared arm before asking Hoon to evaluate the mold, and reports evaluation failures with the final Hoon trace line. `+read-mold-in` remains available when the caller already has the selected type. The opt-in `+read-named-diagnostic` and `+read-mark-diagnostic` preserve successful graphs and distinguish definite `%invalid` aura and core evidence emitted directly by the reader from `%unsupported` failures. Other failures, including unverified union disjointness and vase recognition based only on a name, remain unsupported. These entry points revalidate and re-walk failed types; the opt-in `+golden-types-with-reader-diagnostics` accepts unchanged structured reader results and reports definite aura or core errors at their imported mold use sites, when the import and supplied input are unique. Ordered replay covers direct and nested cell samples, record and function casts, and non-generic same-module aliases; it stops at an unsupported prefix, cycle or shadowing failure. Union molds, generic applications, transitive modules and unsupported reader outcomes still report generic limitations. Replay repeats inference and may add work; this entry point remains partial. Existing checker entry points continue treating failed imports as unsupported. It also fails closed on repeated field faces along an imported record spine, including recursive roots; the diagnostic remains generic. Hoon type graphs can erase unfaced nested-cell boundaries, so the check may conservatively reject a valid source with equal names in distinct erased scopes. Faced nested records and union alternatives keep separate scopes.
94−
95−The partial report can diagnose certain non-gate value dependency cycles, including cycles through gates. It requires an explicit atom or loobean result cast and a syntactically proven dependency group with unshadowed simple samples; it identifies the value and a dependency site. Untyped results, branches, nested definitions, qualified wings and complex samples remain unsupported. The proof constructs an additional dependency graph. One 24-case recursive/generic eval run took 19.7 s with it and 18.6 s before it, including startup; these single runs do not isolate the graph cost.
96−
97−The source-backed `+api-path-analysis-source` is a separate partial analysis, not an API check: it resolves reachable Jibb imports and declared mark graphs and returns path and scry segments, full and diff mark identities and their types. It also checks derived-name collisions. Full and diff payloads must be direct declared mark names; typed scry parameters must be a same-name, same-aura subset of the watch parameters, and unknown or duplicate segment binders fail closed. It creates no request gates. The caller must pass a trusted prepared prelude and unchanged source-aware reader results.
98−
99−`+api-path-evidence-source` retains that analysis with the API source, complete prepared prelude (including reserved names), supplied reader results and resolved Jibb dependency cache. `+api-path-watchability` classifies a unique declaration as watchable or not watchable, or reports unknown when evidence is absent or ambiguous. The artifact and reader results are trusted host inputs; the host must bind them to the source versions used later. This is declaration evidence, not proof about an arbitrary request value, a checked API module, a runtime validator or an island watch.
100−
101−For a unique supported declaration, `+api-request-parts` retains that evidence with the typed path parameters in source order, the full-state reply sample, and a fold type when there is one diff mark. The fold takes the tagged diff and previous full state and returns full state. Missing or ambiguous evidence, unsupported parameter auras and multiple-diff folds fail closed. These are components for a future request gate; they do not yet fix its argument order, construct a request, or prove watchability of a value.
102−
103−`+api-support-analysis-source` additionally infers supported ordinary API molds and values, resolves every declared mark, and retains their source, dependency and path evidence. Unsupported helpers or marks fail closed. An unused `/-` core is not independently validated, ordinary definitions that need derived gates remain unsupported, and this result is not a checked API interface or an exported request.
104−
105−The ordinary import resolver can infer derived request-gate types for multiple supported API paths. A case may take one typed path parameter before its reply gate, or one diff fold after the reply; a case with both, multiple parameters or diffs, or a separate scry path remains unsupported. Each reply maps the full mark type to a fresh `M` and the request result is `(ask M)`. Checked ordinary API values and molds, declared mark molds and a supported poke constructor are exported too. Every selected `/sur` core must have a directly used, successfully read mold; unselected core bindings are not independently validated, and Jibb module imports remain unsupported in this API fragment. The unchanged todo API fits this fragment.
106−
107−A call whose direct result is a known named generic union can receive a matching same-origin, same-arity result context before its arguments are inferred. This retains the ordered generic arguments and existing capital checks; pending tags, recursive or variable-bound origins and unrestricted atom cases remain conservative. Constructor fitting reports unsupported when an unresolved or opaque case could contain the requested tagged head. It keeps definite missing-case errors for proven nonmatching cases, including an explicitly atom-only faced head. The real todo callback `|=%got` can infer when an `(ask msg)` result context fixes its message union; the uncontextualized call remains unsupported.
108−
109−A two-item tuple with an explicit term, null or loobean head can receive payload context from a known union when every alternative is a literal-headed cell and its head noun is unique. The payload must be a direct wing-headed call, optionally grouped, with literal, wing or constructor arguments. The checker first retains the original inference if it already fits; otherwise it tries the contextual path once and fits the selected case and enclosing union. It declines this path if any substitution has a structural root, because a caller may have walked away variable provenance. Duplicate heads, opaque competitors and other shapes also stay conservative. The guard scans the substitution for each eligible tuple and may perform one extra shallow inference; it does not guarantee globally linear work. This lets an explicitly typed todo subscription body infer; it does not check an island or prove request watchability.
110−
111−`+gate-free-type` is a separate three-way proof over normalized checker types: it reports a gate-free result, a gate-bearing witness with its field path, or unknown. It tracks conservative inhabitance before reporting a gate in a cell, spends one shared node budget, and treats opaque recursion, open variables, unknown collection forms and `*` conservatively. Source-proven `qath` and the recognized list/unit representations have dedicated proofs. `+gate-free-mold-source` parses and resolves one named mold with a fresh active-root graph, retaining the complete prepared prelude, source bundle, trusted reader inputs, dependency cache and inferred mold. It caps classification at 256 nodes; parsing, import resolution and type inference are not covered by that cap. The host must canonicalize paths and bind trusted sources and reader results to their versions. API, store and private roots decline; other definitions and unused imported Hoon bindings are not fully checked. This is mold analysis, not a module, kind, island, watchability or runtime check, and it does not infer general gate-free constraints.
112−
113−Each case's canonical API identity and source-derived schema travel across imports in a nonrecursive graph certificate containing the exact source bundle, prelude, reserved scope and trusted reader results. Cached interfaces must match those inputs and cannot hide an active ancestor; unknown legacy entries are rebuilt from their unique supplied source. Request-bearing closures are limited to 256 paths and requests. Closed gate samples can also fit when an unnamed input slot corresponds to a named one, provided products are identical and nested value faces and ambiguous cell tails remain intact. This is type inference only: request lowering, runtime schema validation and value watchability proofs are not implemented.
114−
115−`+golden-types-with-prelude` accepts case-local Jibb module sources alongside `/sur` and mark results and the vendored prelude source. It resolves reachable ordinary library modules in dependency order, caching completed interfaces per invocation and exporting supported closed value schemes, direct generic unions, and simple or nonrecursive generic mold aliases whose bodies the fragment supports. It detects missing sources and cycles and rejects a dependency if its interface cannot be inferred by the fragment. Qualified wings can also read nested fields of an imported value, instantiating that value’s scheme independently at each use; missing, ambiguous and non-record fields remain unsupported.
116−
117−The supplied prelude is parsed into a **partial interface**: all names actually declared in the source are reserved, while only the molds and values this fragment can infer are available. These include the validated standard `list` mold, `unit`, the doc-exact generic `cmd` union, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc`, `turn`, `flop`, `rear`, `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy`, `lien`, `cork`, `corl`, `cury` and `curr`; unsupported entries remain unavailable. The validated `list` is injected while the prelude’s gates are inferred; `weld` and `turn` use ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through a direct or transitive mold alias. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. A named prelude union keeps the fixed `/lib/jibb/prelude/jibb` origin in every module, and its name remains unqualified when a library exports a type containing it. The prelude inventory is incomplete, so reserving the names in this source does not establish complete shadowing coverage. The source-backed internal prelude defines `poke`, which the public prelude re-exports as an ordinary transparent type. A dedicated trusted internal-prelude preparation path also supplies private comparison and arithmetic schemes for the Jibb-written `gth`, `add` and `dec` wrappers. Ordinary module resolution rejects that primitive path even if a caller supplies a spoofed root or bundle. The low-level prepared interface is still trusted host input; the host must select the vendored sources and canonicalize paths. Primitive execution and shape-based jet recognition are not implemented. The source-backed `add` and `dec` wrappers use private arithmetic interfaces whose shared atom variable excludes loobeans; the partial checker preserves that constraint through supported inference and prints `where A is an atom other than ?`. Length and primitive execution remain unavailable. The partial checker resolves its supported source shape, preserves its public name, and rejects ordinary imports of the private internal path. An imported API with one mark and a matching direct `+$ poke` declaration can export a derived constructor and retain agent/mark metadata when the source representation has the supported agent case. Other API shapes, complete private module checking, root API and kind checking, stores, complete `ask` and `pure` checking, lowering and runtime effects remain unfinished. A possible store or root API declaring `+$ poke` reports that kind or scope needs unsupported inference; definite duplicate declarations and unrelated shadowing still report conflicts. Prepared interfaces and caches are trusted caller inputs; the future host and linker must ensure the private source validated during preparation is the same version used to lower derived constructors. A `*` payload may contain gates, so the fragment treats it conservatively; full gate-free checks are unfinished. The shared module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship.
118−
119−`+prepare-prelude` derives the interface and declared-name inventory from the trusted vendored source. Hosts can reuse its result with `+golden-types-with-prepared-prelude`; they must pass the unchanged result of preparation, not an independently constructed value. Empty, malformed and duplicate-name prelude sources fail closed. The source-taking `+prepare-prelude` and `+golden-types-with-prelude` do not supply the internal module; their `-and-internal` or `-with-internal` variants accept its source for the supported private import. API files, modules with `main`, unsupported definitions and many other features remain outside this subset. The older `+golden-types-with-modules` entry point fails closed for imports because it has no prelude scope. None of these partial reports claims the module has been checked.
120
66
121And the design notes:
67And the design notes:
122
68
@@ -127,26 +73,16 @@ And the design notes:
127| 3. The parser | Why recursive descent (the grammar is LL(2) after the layout pass), the EBNF rule by rule with the node each gives, what the EBNF leaves out and how it's filled in, spacing, and where each error points, with its message |
73| 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 |
128| 4. Printed formats | The token, tree and error formats the golden files hold |
74| 4. Printed formats | The token, tree and error formats the golden files hold |
129
75
130−Source-backed `like` maps the product of an existing `(like A)` result while retaining its position and remaining input. The partial checker infers supported positional calls by peeling only known sample-slot faces, retaining faces belonging to values; ambiguous variable-bound spines and nested face loss remain unsupported. Backend execution remains outstanding.
131−
132−The internal prelude defines transparent `(ask M)` cases for pure, agent and store requests; the public prelude re-exports it and defines `pure` in Jibb. Preparation supplies the private module with `list.core` and `unit.core` only from validated canonical public templates. If a template is unavailable, an isolated check validates the private molds, but only molds independently inferred against the actual available templates enter the interface. The partial checker infers supported constructors and exhaustive matches; absent versus present-zero state remains distinguishable. Agent and store receiver fields carry raw nouns and cannot prove schema validity or watchability. The public prelude also defines the documented `sub` union in Jibb; supported watch payloads retain the public `(ask M)` type. A `sub` value is not itself proof that its request is watchable. Generated decoders, source-bound runtime validation, request lowering, other derived request shapes and island watch checks remain unfinished. Public prelude preparation is partial: consumers must verify that `ask` was actually exported with its source origin.
133−
134−Public identity aliases of private generic unions retain their public name when the origin, arity and argument order match exactly, including through imported values. Fixed, reordered, repeated and phantom generic aliases remain unsupported where a safe public name cannot be recovered; a fixed nongeneric alias is not printed as though it accepted type arguments.
135−
136−The partial checker reserves `proj` in module, local, sample, pattern and import bindings, including bindings inside unsupported source; a field, tag or path segment may still have that spelling. With a known expected record type, it checks selected explicit `(proj record)` calls over closed, uniquely faced records, preserving the source expression, its type, the result type and field axes in the checked interface. Imported and private-prelude dependencies retain the source needed to lower those plans. The checker does not yet lower or execute them. It supports selecting one or more fields in their original order; a single selected field keeps its face and uses one source axis. Reordered fields, unknown or open record spines, some nested contexts and recursive groups with projections remain unsupported. A directional fit of a wider faced record fails closed instead of inserting a projection, including within supported list, unit and record positions. To limit repeated work, record-spine proofs are reused along the same closed spine and stop at 1,024 fields; field boundaries and the special handling of positional calls reset the appropriate proof. Prepared interfaces and their source remain trusted host inputs.
137−
138## The tree
76## The tree
139
77
140Every node is `[%tag at=span …]`, so `+span-of` finds its span in one place; the few that aren't say so in the `%tree` chapter. The kinds of node:
78Every 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:
141
79
142- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
80- **Module**: imports (`%sur` for `/-`, `%mark` for `/%`, `%jibb` for `/=`), then definitions (`%mold` for `+$`, `%value` for `++`).
143- **Expressions** (`expr`): `%lit`, `%str`, `%path`, `%qath`, `%wing`, `%change`, `%pair`, `%unit`, `%group`, `%list`, `%tuple`, `%gate-wide`, `%ctor`, `%call`, `%gate`, `%cast`, `%trace`, `%branch`, `%crash`, and `%body` for an indented body, with its local definitions if it has any.
81- **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.
144−- **Molds as written** (`shape`): `%aura`, `%hole`, `%noun`, `%void`, `%flag`, `%const`, `%ref`, `%tvar`, `%path`, `%apply`, `%cell`, `%union`, `%fn`, `%generic`. A `%hole` retains the span of `_`; an inferred typed path segment retains that span separately from its enclosing segment. A `%union` spans its first through last case and has no lead token; a single case is its own mold. `%generic` spans from the `|$` after a `+$` name through its body.
82+- **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.
145- **Samples, fields and patterns**: a sample is `%bind`, `%face`, `%pun`, `%cell` or `%bare`, since a bare name binds anywhere in a sample; a pattern is `%lit`, `%str`, `%any`, `%bind` or `%cell`.
83- **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`.
146- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
84- **Literals** (`lit`) keep the form they matched, their aura and value, and their text as written, which the printers show.
147
85
148−The parser accepts type holes. The partial checker records each ordinary hole with its span and validates the obligations created in a value or local definition before generalization. A solved concrete type or an explicitly written in-scope capital resolves a hole; a later use cannot repair it. Independent decimal holes may default to `@ud` when the surrounding inferred type is gate-free; variables reachable from the environment or written capitals are protected from premature defaulting. Structural named-mold holes are diagnosed at their source, while complex named molds, inferred path segments, recursive groups with holes and unresolved constraints remain unsupported. Partial prelude and API interfaces cannot silently export unchecked holes. A separate syntax-tree pass reports duplicate names within a written record at both field sites, including in unused definitions; nested and separate records have independent scopes.
149−
150The tree keeps everything the checker needs to report an error at the code as written: open and closed brackets give the same node, but every node keeps its span.
86The 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.
151
87
152## Positions and errors
88## Positions and errors
docs/development.md+3−52
@@ -60,30 +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-tlon-test` | Runs the real Tlon presence source through the importer and partial checker, comparing `tests/type-tlon/expected.txt` under eval |
66−| `tools/type-import-diagnostic-test` | Compares the structured reader diagnostic bridge report under eval |
67| `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 |
68−| `tools/type-poke-test` | Checks source-backed prelude and poke-only API reports against `tests/type-poke/expected.txt` under eval |
69−| `tools/type-api-paths-test` | Checks partial API path analysis with real todo mark samples against `tests/type-api-paths/expected.txt` under eval |
70−| `tools/type-api-evidence-test` | Runs source, scope, reader-result and declaration-watchability evidence guards under eval and on the ship |
71−| `tools/type-hole-guards-test` | Runs the shared hole-defaulting and API interface guards under eval; the same checks run on the ship |
72−| `tools/type-list-alias-test` | Runs the shared prelude list-alias and provenance guards under eval and on the ship |
73−| `tools/type-generic-alias-test` | Runs public/private generic union alias and provenance guards under eval and on the ship |
74−| `tools/type-positional-face-guards-test` | Runs positional-call and nested-face guards under eval and on the ship |
75−| `tools/type-qath-guards-test` | Runs source-provenance, recursive unfolding and face guards under eval and on the ship |
76−| `tools/type-todo-api-test` | Exercises the actual todo API through the real Hoon readers and partial checker |
77−| `tools/type-closed-gate-guards-test` | Checks closed gate sample labels and face uncertainty under eval and on the ship |
78−| `tools/type-constructor-fit-guards-test` | Checks constructor-case uncertainty and known mismatches under eval and on the ship |
79−| `tools/type-nested-union-guards-test` | Checks nested tagged-union case selection and uncertainty under eval and on the ship |
80−| `tools/type-gate-free-guards-test` | Checks bounded gate-free verdicts, inhabitation and witness paths under eval and on the ship |
81−| `tools/type-gate-free-source-test` | Checks source-backed todo mold analysis through the real readers under eval and on the ship |
82−| `tools/type-sub-guards-test` | Checks source-backed subscription mold dependencies under eval and on the ship |
83−| `tools/type-ask-guards-test` | Runs ask origin and canonical list/unit bootstrap guards under eval and on the ship |
84−| `tools/type-request-guards-test` | Runs request evidence, source consistency and cache provenance guards under eval and on the ship |
85−| `tools/type-proj-guards-test` | Runs projection evidence, name-scope and dependency guards under eval and on the ship |
86−| `tools/type-arithmetic-guards-test` | Runs restricted atom-variable, unification and projection guards under eval and on the ship |
87| `tools/type-module-scope-test` | Checks the partial module checker’s prelude boundary and duplicate-source rejection against `tests/type-module-scope/expected.txt` under eval |
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 |
88| `tools/clay-fixtures` | Syncs `my-app`, builds its example `/sur` files and marks through Clay, checks selected mold and mark projections and the partial checker, and records Ford and mark subject shapes on the fake ship |
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 |
89| `tools/hoon` | Evaluates Hoon with the library in scope, as `tools/hoon '(golden /a/b/jibb (crip "++ main view"))'`; `--cord name=file` binds a file's text, `-f` reads the expression from a file |
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 |
@@ -91,7 +69,6 @@ git clone https://github.com/urbit/tools /root/src/tools
91| `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` |
92| `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 |
93| `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 |
94−| `tools/testdata/clay-fixtures-selftest` | Tests temporary Clay fixture cleanup and signal handling without a ship |
95
72
96`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.
97
74
@@ -100,44 +77,20 @@ git clone https://github.com/urbit/tools /root/src/tools
100```
77```
101tools/golden # all cases pass
78tools/golden # all cases pass
102tools/importer-test # Hoon importer fixture projections match
79tools/importer-test # Hoon importer fixture projections match
103−tools/type-import-default-test # default-wrapped source proofs match
104tools/type-import-test # importer/checker bridge golden report matches
80tools/type-import-test # importer/checker bridge golden report matches
105−tools/type-tlon-test # real Tlon importer/checker report matches
106−tools/type-import-diagnostic-test # direct structured reader diagnostics match
107tools/type-mark-test # mark/checker bridge golden report matches
81tools/type-mark-test # mark/checker bridge golden report matches
108−tools/type-poke-test # source-backed poke/API bridge report matches
109−tools/type-api-paths-test # partial API path analysis report matches
110−tools/type-api-evidence-test # API declaration evidence guards pass
111−tools/type-hole-guards-test # hole defaulting and API guards pass
112−tools/type-list-alias-test # prelude list-alias guards pass
113−tools/type-generic-alias-test # generic union alias guards pass
114−tools/type-positional-face-guards-test # positional sample face guards pass
115−tools/type-qath-guards-test # qath source and unfolding guards pass
116−tools/type-todo-api-test # real todo API partial inference and reader guards pass
117−tools/type-closed-gate-guards-test # closed gate fit guards pass
118−tools/type-constructor-fit-guards-test # constructor fit guards pass
119−tools/type-nested-union-guards-test # nested union selector guards pass
120−tools/type-gate-free-guards-test # bounded gate-free classifier guards pass
121−tools/type-gate-free-source-test # real todo mold analysis and source guards pass
122−tools/type-sub-guards-test # subscription source guards pass
123−tools/type-ask-guards-test # ask source and bootstrap guards pass
124−tools/type-request-guards-test # request evidence and cache guards pass
125−tools/type-proj-guards-test # projection evidence and scope guards pass
126−tools/type-arithmetic-guards-test # arithmetic constraint guards pass
127tools/type-module-scope-test # module/prelude scope golden report matches
82tools/type-module-scope-test # module/prelude scope golden report matches
128tools/hoon check-spans-test # prints <<>>
83tools/hoon check-spans-test # prints <<>>
129−tools/hoon itype-unify-test # type-unification controls pass
130tools/testdata/selftest # 22 checks, 0 failed
84tools/testdata/selftest # 22 checks, 0 failed
131tools/doc-blocks docs/spec # every jibb block has its case
85tools/doc-blocks docs/spec # every jibb block has its case
132tools/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
133tools/ship test # the cases pass as -test arms on the ship
87tools/ship test # the cases pass as -test arms on the ship
134tools/testdata/ship-selftest # when tools/ship changed
88tools/testdata/ship-selftest # when tools/ship changed
135−tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
136tools/ship check-commit # when the mark or the desks changed
89tools/ship check-commit # when the mark or the desks changed
137−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
138```
91```
139
92
140−`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.
141
94
142## Golden cases
95## Golden cases
143
96
@@ -149,9 +102,7 @@ A case is a folder `tests/golden/<name>/` holding:
149- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
102- optionally, `path.txt`, the logical `/ui/.../*.jibb` path to pass to the compiler; the source remains `source.jibb`.
150- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
103- optionally, an `expect-types:` line in `about.txt` opts the case into `+golden-types`; `types.txt` holds its output plus one newline and `--update` creates it. A `types.txt` also opts in when the line is absent. This interface is provisional while the checker is under construction.
151- 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.
152−- 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 source to the partial module checker, so it can reserve prelude names. 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. The checker is partial; its output says what it did and did not check.
153−
154−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.
155
106
156A 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.
107A 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.
157
108
docs/open-questions.md+6−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) and checking it against the doc's examples. The numbering is retained so existing references stay valid. Questions 3, 18, 20, 21 and 22 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,11 @@ 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.
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
45
69## Grammar questions never put to the doc's author
46## Grammar questions never put to the doc's author
70
47
docs/prelude-inventory.md+10−18
@@ -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 related `sub` declaration awaits checking and the remaining request support.
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. 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. Backend validation remains 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. | Missing |
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`, `levy`, `lien`, `murn`, `rear`, `reel`, `roll`, `skim`, `skip`, `snip`, `turn` and `weld`. `murn` keeps the present products of its gate in order; `join` inserts a separator between items; `snip` drops the last item, and `rear` returns it or crashes on an empty list. The folds take an explicit initial value as the Prelude table specifies. The partial checker infers `snoc`, `lure`, `weld`, `turn`, `flop`, `rear`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` using the validated prelude `list` mold; other list helpers remain limited by that fragment. The result casts on `drop`, `skim`, `skip`, `murn`, `join`, `snip`, `levy` and `lien` state their existing result types without changing their bodies. Backend validation remains outstanding for all of them.
46+The current prelude writes `snoc`, `lure`, `flop`, `levy`, `lien`, `reel`, `roll`, `skim`, `skip`, `turn` and `weld`. 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`, `levy`, `lien`, `murn
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+8−111
@@ -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,31 +19,7 @@ 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 and nested faced or unfaced cells from `/sur` molds and marks into inference. The reader handles mark samples, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, certain ordered-map fields, and direct `$^` unions whose cases can be proved disjoint. 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 the current prelude names, 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. Variable-dependent face merges remain unsupported. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive local groups, recursive and union generic molds, branch tag context, union type printing, 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; its golden fixtures include three real Tlon files. The prelude currently has only a few functions, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
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.
25−
26−The internal prelude also defines `qath` as a transparent recursive knot sequence, re-exported by the public prelude. The partial checker recognizes its source identity, supports selected null/cell construction and matching, and types static application-path literals. Other recursive shapes, broader patterns and dynamic application-path segments remain unsupported. A 256-step limit applies per inference attempt, not to parsing or retries; checking routes and static files remains milestone 4.
27−
28−The internal prelude defines a transparent generic `ask` with pure, agent and store cases, re-exported alongside the Jibb-written `pure` gate. The partial checker infers supported constructors and exhaustive matches. Agent and store receivers operate on raw nouns; their fields do not prove schema validity or watchability. The public prelude now defines the documented source-backed `sub` union; supported `%watch` payloads retain the public `(ask M)` type. Constructing a `sub` does not prove that its request is watchable. Request lowering, checked decoding, runtime validation and island watch checking remain unimplemented.
29−
30−Known same-origin generic-union result context can now constrain a call before its arguments are inferred. An unresolved or opaque constructor target stays unsupported rather than producing a definite mismatch; proven missing tags still report errors. A todo request with explicit `(ask msg)` context can infer `|=%got`; its uncontextualized form remains unsupported. A two-item literal-headed tuple can receive payload context from a known union of uniquely headed literal cells when its payload is a shallow wing-headed call with literal, wing or constructor arguments. Existing inference takes precedence when it fits; otherwise the checker tries the contextual path once. It conservatively declines that path when any substitution has a structural root, as well as for duplicate or opaque competitors. The guard scans substitutions per eligible tuple and may add one shallow inference; no global linear-time bound is claimed. This allows an explicitly typed todo subscription body to infer, but does not check the island or prove request watchability.
31−
32−A separate source-backed analysis can prove one named mold gate-free, report a definite gate with a field path, or return unknown. It retains the prepared prelude, source bundle, reader results and resolved imports; the actual todo model proves gate-free, while a callback field reports its path and `*` remains unknown. Its classifier is capped at 256 nodes, not the surrounding parse and import work. API, store and private roots are unsupported, and the artifact does not check a module or island, infer generalized constraints, or prove watchability.
33−
34−The API path analyzer can retain its source, complete prepared prelude, reader results and resolved dependencies as evidence, and classify a unique declaration as watchable, not watchable or unknown. It does not yet prove the provenance of request values or check island subscriptions. Prepared artifacts and reader results remain trusted host inputs.
35−
36−For a unique supported path declaration, the request-parts analysis derives ordered typed path parameters, a full-state reply sample and a fold type for one diff mark. Multiple diffs and unsupported or ambiguous evidence fail closed. By itself it does not create request gates or establish watchability of values.
37−
38−A separate supporting-definition analysis infers supported ordinary API molds and values and resolves all declared marks, retaining their source and dependency evidence. It fails closed on unsupported helpers or marks; unused `/-` cores are not independently validated, and definitions depending on derived gates remain unsupported. This does not check or export the whole API.
39−
40−Ordinary imports can infer derived request-gate types for multiple supported API paths. A case may take one typed segment before the reply or one diff fold after it; the unchanged todo API's plain, typed and diff requests infer, including a named closed fold. Checked ordinary API definitions, mark molds and a supported poke constructor are exported. Each `/sur` core must have a directly used, successfully read mold; unselected bindings are not independently validated. Jibb module imports, scry paths, multiple parameters or diffs and a parameter together with a fold remain unsupported. Source-qualified request evidence and exact trusted graph inputs survive transitive imports and cached interfaces, while stale or ambiguous evidence fails closed. This is a type-only interface: request execution, schema validation and proof that a request value is watchable remain unimplemented. In one loaded-machine run, the real-todo eval took 195.83 s wall and 67.83 s user CPU; the prior prototype took 111.81 s wall and 64.60 s user. Both include Hoon compilation and reader setup and overlapped other work, so they are not isolated checker benchmarks.
41−
42−The Hoon reader's tagged-union source proof also handles `$~` default wrappers. A shared eval and ship golden exercises the unmodified Tlon `epic.saga` mold as a named payload in a labeled downstream extension, alongside overlap, recursive, shadow and malformed-wrapper controls. The tagged-source helper peels at most four consecutive defaults; defaults inside dependency proofs spend the existing semantic-node budget. Other unverified nested unions and dependencies remain unsupported.
43−
44−The repository spec records the subsequent type-system and prelude decisions, including the chosen `like` result-mapping gate; those changes also need synchronization to the Claude document. An initial inference fragment and a standalone Hoon type reader are being tested. The fragment explicitly reports that it does not check a module; partial bridges pass Hoon `*` in supported nonrecursive molds, selected Hoon atoms, term singletons, the null singleton, the two loobean singletons and their exact fork, nested faced or unfaced cells, supported disjoint unions and opaque standard collections from `/sur` molds and marks into inference. Collections retain their names and supported arguments for printing and unification; nested supported union arguments are retained too. The bridge trusts unchanged results from the source-aware reader; a materialized type graph alone cannot reveal cases Hoon already collapsed. The source-validated standard prelude `list` mold shares this representation with imported lists; other Jibb-written collection molds and most prelude collection operations remain unsupported; malformed names and arities fail closed. Selected self-recursive `/sur` molds, including Tlon `notes.import-node` with list-wrapped self references, cross as opaque module-and-name identities; aliases, foreign references, recursive marks, unfolding and construction remain unsupported. The reader handles mark samples, including a source-proved nonrecursive union from a single Ford-imported `/sur` core, recursive molds whose origins can be verified through Ford imports, nested collections, direct ordered maps, including source-validated named operands such as Tlon `notes.log`, certain ordered-map fields, direct `$^` unions whose cases can be proved disjoint, and one verified explicit union argument in a list, set, map or unit. Tagged `$%` cases can additionally use restricted local named payload molds, bare `~` fields and one level of local named tagged unions, as in real Tlon `notes`, with bounded source proof; unsupported or ambiguous dependencies fail closed. Ambiguous recursive origins fail closed; recognizable explicit unions are checked from source before Hoon can collapse their cases, as @iko confirmed for imported `$%`, `$?` and `$^`, while other nested unions, nested ordered maps, general union disjointness and complete import integration remain unfinished. Opt-in structured reader APIs preserve successful graphs and distinguish definite unsupported-aura and core evidence from failures the reader cannot prove; unverified union disjointness and name-only vase recognition remain unsupported. They revalidate and re-walk failed types. An opt-in partial checker entry point consumes unchanged reader results and reports definite aura or core errors at imported mold use sites when their inputs are unique. Ordered replay covers nested cell samples, record and function casts, and non-generic same-module aliases; unsupported prefixes, cycles and shadowing stop it. Union molds, generic applications, transitive modules and unsupported reader outcomes remain generic. Replay repeats inference and may add work. The partial checker resolves a subset of ordinary library imports in dependency order using supplied Jibb sources and a source-derived partial prelude interface, caches completed interfaces per run, detects missing sources and cycles, and resolves nested fields of imported values with independent scheme instantiation. The source-backed internal prelude defines `poke` and the public prelude re-exports it as a transparent type. A dedicated trusted preparation path supplies private comparison and arithmetic schemes to the Jibb-written `gth`, `add` and `dec` wrappers; ordinary imports cannot access them. The public `add` and `dec` wrappers use private arithmetic interfaces; supported inference preserves the shared atom constraint that excludes loobeans. Primitive execution, jet recognition and length remain unfinished. The partial checker resolves its supported source shape and rejects ordinary imports of the private path. An imported API with one mark and a matching direct `+$ poke` declaration can export a constructor and retain agent/mark metadata when the representation has the supported agent case. A separate partial analysis resolves supported API path declarations and their full and diff mark types, including the todo paths; it does not by itself create requests or check an API module. Ordinary imports additionally infer the supported multi-path request-gate types described above. Complete private module checking, other API shapes, request lowering, root API and kind checking, stores, complete `ask` and `pure` checking and runtime effects remain unfinished. A possible store or root API with `+$ poke` reports unsupported kind or scope, while definite duplicates and unrelated shadowing still report conflicts. The prelude includes the doc-exact generic `cmd` union; the prelude inventory is incomplete. The inference fragment supports unrestricted `@`, selected one-way widenings including aura-family ancestors, generalized atom constraints arising from explicit capitals or bare sample binders, acyclic local value definitions with captures, selected single self-recursive top-level and local gates, simple and nonrecursive generic mold aliases, selected faced record casts and field reads, and contextual tags, `~` and constructors for closed disjoint unions, including direct nonrecursive generic unions and propagation through complete loobean and unit-shaped branches in casts and known union-sample calls, including nested branches. Known loobean result context also propagates through supported complete branches and binder-only cell arms; binder-only arms over union subjects remain unsupported. A directly known named union can instantiate an unconstrained generic gate sample with its origin, generic arguments and faces preserved; unnamed, pending, recursive and variable-bound cases remain unsupported. A known gate with an unresolved result variable can receive a known enclosing result type before its arguments are inferred; unknown calls and unresolved targets remain conservative. Multi-argument calls form a right-nested sample, retain known faces and shared type variables, and can use known sample positions to contextualize list and union arguments. A definite mismatch points to the failing argument when the fragment can establish it, otherwise to the combined sample; unsupported contextual forms still fail closed. For a supported recursive gate, the checker infers the sample first and uses its exact type, including field faces, for one monomorphic self reference. It generalizes after the body is checked; subsequent uses instantiate it independently. Incompatible recursive arguments can report the gate and argument sites. For a complete loobean branch with one direct self-call arm, a separately inferred closed base type can seed the recursive result before the whole body is checked. Open or pending base types do not seed it; other branch shapes remain subject to the fragment’s existing limits. A supported single local recursive gate also uses a monomorphic self reference and generalizes variables free of the enclosing environment after checking its body; captured variables remain shared. The checker collects written capitals per `++` before inference, excluding nested definitions: a capital used in an enclosing definition is shared with its locals even when written later, while a capital introduced only in a local definition is generalized there. Sibling locals can introduce independent capitals with the same spelling; generic mold parameters keep their own scope. Top-level groups of syntactic gates are inferred together with monomorphic placeholders and shared substitutions, then generalized only after the whole group checks; downstream uses and library interfaces instantiate those schemes independently. A dependency graph identifies groups with two iterative depth-first passes; its conservative local-reference edges can reject otherwise valid programs. Supported local mutually recursive gate groups also use shared monomorphic placeholders and generalize only after the group checks, preserving captured outer variables. A bounded dependency proof reports certain non-gate cycles through values and gates when an explicit atom or loobean result cast and simple unshadowed expressions establish the cycle. Other mixed gate/value cycles, polymorphic recursion, unresolved literal constraints and unresolved branch joins remain unsupported. Reporting repeats inference for a single recursive gate outside a group; grouped reports use the stored schemes. Its performance cost remains unmeasured. A single-arm cell pattern accepts two or more binders, the last capturing the remaining tail; duplicate and shadowed binders are rejected. A structured single-arm pattern also works for a known non-union cell when coverage is proven, including nested literal and wildcard positions. Intermediate union or collection tails, nested patterns, wildcards and faced records remain unsupported. String interpolation accepts known atom auras, unrestricted `@`, tapes and isolated decimal literals; a known cell asks for a printer, and an explicitly generic atom asks for an aura. Loobeans, term singletons, non-tape collections, open types and a type fixed only later remain unsupported. A known closed union with two or more arms supports patterns that provably cover or exclude each remaining case, including payload binders, imported and generic cases, and binder-free catch-alls. Partial boolean patterns can split known `?` positions into their two noun values, up to 64 alternatives across the union; binders retain their original case type. Missing alternatives and covered arms are reported. Other partial patterns, expansions above the limit, binders spanning distinct cases, differing arm result types and some complex two-arm subjects remain unsupported. A cast or known call sample can supply result context through whole-case arms and supported finite loobean refinements for a known union accessed by a wing, a grouped wing or a supported shallow call, including nested cell and list positions; other partial-pattern contexts and subject forms remain unsupported. The Grammar’s `step` block infers in this fragment, but its module is not yet checked. A bare tag proved absent from a known union reports the union and tag sites in casts, single-argument calls, unit payloads, list items and supported branch arms; imported unnamed unions print their cases. Ordered fit replay can identify a missing tag nested in a syntactic tuple, stopping at an earlier mismatch or uncertainty. Known faced records support uniquely named field changes, including nested wings, with field context passed to replacements and the original record type retained. Missing fields, empty changes and definite mismatches report sites; the expected-type site is the edit because the original field declaration location is not retained. Unknown or partly unfaced spines, ambiguous fields and repeated edits remain unsupported. A known record cast supplies field context to its tuple or record initializer, including nested list and union fields; mismatch diagnostics use the cast mold because the original field declaration location is not retained. Isolated cart-style `init` and `update` expressions infer, while the complete cart-store fails closed because its kind and declaration scope remain unchecked. Uncontextualized list literals infer a fresh element type, including empty and nested lists, with independently generalized uses. Unresolved item tags and uncertain widening remain unsupported. Backtick unit construction uses the validated standard prelude unit template, infers its payload without losing pending constraints, and makes the prelude’s `some` available. Ordinary result annotations also let its `bind`, `biff`, `both`, `clap`, `clef` and `flit` infer. A known unit in a cast, call, list item or record field supplies context to its payload, including nested units and lists; mismatches identify the payload and context. Unrelated union identities, some variable-dependent fits, and missing or altered prelude unit templates remain unsupported. Literal singleton heads compare by runtime noun, so `|=%$` also matches explicit null- and loobean-zero-headed cases. When equal heads have disjoint payloads, the constructor selects a uniquely proven compatible payload; unknown and ambiguous candidates remain unsupported. Unresolved nulls remain pending and are reported separately from tags. A known union of `~` and a null-headed cell supports a complete `~` / `[~ value]` branch in either order, including shadow checks; unknown subjects, missing or duplicate arms, and unresolved branch results remain unsupported. This fragment infers the prelude’s `fall` and `need` signatures. With the validated prelude list and a known cast or gate sample, empty, nonempty and nested list literals infer their element types, including contextual union tags; a mismatched element names both sites. In that context `~` and zero-valued terms fit an empty list, and two-item unfaced cells form cons lists, including nested cons and imported-list contexts; invalid heads or tails name both sites. A known gate sample also supplies context to matching positions in a single tuple or record argument, including nested cells; zero literals can fit list positions. A bound zero constant remains unsupported rather than a definite mismatch, and an unknown callee does not supply context. Faced or longer cells and a missing or altered prelude list fail closed. A known list result also supplies context through complete loobean, unit-shaped and list-shaped branches, including recursive and nested branches. For a known standard list with a supported element type, a complete `~` / `[item rest]` branch infers the element and tail types in either arm order and checks binders for shadowing. Unknown subjects, unsupported element types and other or incomplete list patterns remain unsupported. A value with type variable `A` can fit a field whose type is that same `A`, including in generic union payloads and nested or repeated record fields. Other variable-dependent face merges remain unsupported. Forced equality of distinct written capitals now reports both source sites, following @iko’s decision; forcing one to a concrete type remains unsupported. Imported record spines with repeated faces fail closed where used, but only with a generic unsupported diagnostic. Hoon may erase unfaced nested-cell boundaries, so the check can conservatively reject valid names in distinct erased scopes. Supported closed unions print using an in-scope name or imported alias; an unnamed nongeneric union prints its cases, parenthesized when nested. The latter is print-only. Generic union types retain all arguments in their printed name; if that name is unavailable, the partial printer reports the limitation. Different import faces for the same origin remain compatible; compatibility across distinct union origins and some generic-argument comparisons remain unsupported. Nonrecursive generic aliases can reorder, repeat or omit parameters while retaining a union’s origin, including through local scopes and library interfaces. A generic union declared directly inside a body remains unsupported, as do differing-variable face constraints in a union payload. A transitive generic union whose name is unavailable is reported as unsupported instead of hiding its arguments. Unfixed decimal literals default to `@ud` in gate-free inferred types; recursive molds, general branch tag context, other constraint cases and defaulting inside gate types still need work. Collection recognition checks the originating core and fails closed on shadows or unsupported Ford subject shapes; a wrapper regression also rejects forged subjects, samples and tails. Its golden fixtures include three real Tlon files. A Clay test passes a Ford-built nested union through the reader into partial inference. The partial prelude includes `murn`, `join`, `snip`, `rear` and the agreed shared-type `clap`; supported calls infer, while backend validation remains outstanding, and [prelude-inventory.md](prelude-inventory.md) is a source audit, not the complete inventory or signatures. The milestone remains unfinished.
45−
46−The shared prelude interface reserves every name present in the supplied vendored source and makes only supported inferred entries available, including `list`, `unit`, `same`, `fall`, `need`, `bond`, `lure`, `weld`, `snoc` and `turn`. The validated standard `list` mold is injected when the prelude’s own gates are inferred; `weld` and `turn` have ordinary explicit result casts. An absent or altered `list` is not injected, and an altered declaration cannot leak through direct or transitive mold aliases. The same validated template is available when prelude mold aliases are prepared, so supported direct and transitive aliases can use it. Unsupported entries such as most list helpers remain reserved but unavailable; backend validation of the helpers remains outstanding. All callers use the same prelude origin, so a library can export a type containing unqualified `(unit A)` to another module. The source-only `+prepare-prelude` rejects empty, malformed, conflicting or import-bearing source; `+prepare-prelude-with-internal` also accepts the supported private internal import. Prepared values are trusted and must come unchanged from the matching preparation arm. When canonical public list or unit templates are missing or altered, independently inferred private molds remain available, while molds that depend on those templates do not. The module-scope fixture compares the prepared and source-taking paths against the real prelude and a two-module golden under eval and on the ship. The source and checker remain incomplete, so this does not establish complete shadowing coverage or a checked module.
47
23
48## Milestone 1: parser and mark
24## Milestone 1: parser and mark
49
25
@@ -61,9 +37,9 @@ What the plan asks for, and where it is:
61
37
62Besides the plan's list:
38Besides the plan's list:
63
39
64−- 649 golden cases: 429 that parse and 220 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
40+- 468 golden cases: 252 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.
65−- The 649-case corpus passed under `urbit eval` in 91.6 s while other checks were running. The fake ship passed all 678 tests, including the importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union and gate-free guards, with 66.8 s for sync and 81.8 s for tests. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
41+- The 468-case corpus passed under `urbit eval` in 31.7 s. The fake ship passed all 473 tests, including the importer, importer/checker and mark/checker bridges, module scope and unification checks, with 27.0 s for sync and 18.8 s for tests. The importer golden compares 130 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.
66−- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
42+- `tools/testdata/selftest` (22 checks) and `tools/testdata/ship-selftest` test the tools themselves.
67- Two independent audits before 7c739b7, one of which compared the library with a reference parser written in Python from the doc over about 19,000 generated programs. Before ab797a9, a second Python parser, written from the decisions, agreed with the library on 8,000 generated programs and 900 hand-written probes.
43- 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.
68- Speed: starting `urbit eval` and building the library takes about 8 s. After that, a 2,000-line module of 400 definitions parses in about a second. Loops over definitions, arms, lines and items grow no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (library section 3).
44- 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).
69
45
@@ -92,104 +68,25 @@ Besides the plan's list:
92| 8bf1b12 | 2026-10-30 | Infer selected record faces and check nested `$^` in static Hoon records |
68| 8bf1b12 | 2026-10-30 | Infer selected record faces and check nested `$^` in static Hoon records |
93| d8ac47d | 2026-10-30 | Cache library interfaces, preserve imported Hoon record faces, and check nested tagged unions |
69| d8ac47d | 2026-10-30 | Cache library interfaces, preserve imported Hoon record faces, and check nested tagged unions |
94| edd9277 | 2026-10-30 | Infer nonrecursive generic mold aliases with lexical parameters |
70| edd9277 | 2026-10-30 | Infer nonrecursive generic mold aliases with lexical parameters |
95−| 4406f6f | 2026-10-30 | Resolve selected contextual tags and check explicit imported unions |
71+| This change | 2026-10-30 | Resolve selected contextual tags and check explicit imported unions |
96−| 5c73614 | 2026-10-30 | Print supported named and escaping union types |
97−| 0070584 | 2026-10-30 | Propagate union context through loobean branches, read selected unions in Hoon collections, and add `flit` |
98−| 250564c | 2026-10-30 | Infer selected named generic unions, test Hoon collection wrappers, and add list helpers |
99−| e95ef8f | 2026-10-30 | Bridge selected Hoon unions into partial inference and support generic union aliases |
100−| 56a899f | 2026-10-30 | Infer matching variable types in faced fields and bridge opaque Hoon collections |
101−| 4d45d2f | 2026-10-30 | Resolve selected contextual null literals |
102−| e878edc | 2026-10-30 | Infer complete unit-shaped branches and bridge selected recursive Hoon molds |
103−| 743dfd8 | 2026-10-30 | Propagate union context through unit-shaped branches |
104−| 3f90fa8 | 2026-10-30 | Share a partial prelude interface across module inference |
105−| 29bd39f | 2026-10-30 | Infer contextual list literals and validate prelude parity |
106−| a2a6ef5 | 2026-10-30 | Infer complete list-shaped branches |
107−| 671fe72 | 2026-10-30 | Infer contextual list nulls and cons cells |
108−| 7e69436 | 2026-10-30 | Infer selected self-recursive gates |
109−| 9ab52e8 | 2026-10-30 | Infer recursive branches with closed base types |
110−| d782b45 | 2026-10-30 | Propagate list context and apply settled type decisions |
111−| c7082e0 | 2026-10-30 | Infer multi-argument calls |
112−| 918acbd | 2026-10-30 | Infer recursive gates from their samples first |
113−| 1470d18 | 2026-10-30 | Infer selected prelude list helpers |
114−| 10cbf9c | 2026-10-30 | Infer selected local recursive gates and distinguish reader diagnostics |
115−| 45afb13 | 2026-10-30 | Infer local capital scopes and report direct reader diagnostics |
116−| 054e651 | 2026-10-30 | Report nested reader diagnostics |
117−| 98c19cd | 2026-10-30 | Infer known-aura string interpolation |
118−| ddba633 | 2026-10-30 | Infer top-level mutually recursive gates |
119−| 9f1517e | 2026-10-30 | Infer whole-case union patterns and prelude `turn` |
120−| 9dd35c8 | 2026-10-31 | Match finite boolean refinements of union cases |
121−| 54852d4 | 2026-10-31 | Contextualize tuple calls and infer known record changes |
122−| 0bc5113 | 2026-10-31 | Contextualize record initializers and infer unit construction |
123−| 264a436 | 2026-10-31 | Contextualize unit payloads in casts, calls and nested values |
124−| a140383 | 2026-10-31 | Report missing union tags and infer prelude unit helpers |
125−| d69cc52 | 2026-10-31 | Infer longer cell binder patterns and prelude unit helpers |
126−| ae35005 | 2026-10-31 | Import source-verified tagged Hoon unions |
127−| c8f894a | 2026-10-31 | Report nested missing tags and contextualize union branch results |
128−| ef2ea71 | 2026-10-31 | Import Hoon null singleton cases |
129−| 67f900e | 2026-10-31 | Infer local mutual gates and uncontextualized lists |
130−| 7ff15f1 | 2026-10-31 | Contextualize finite union patterns and record the initial poke decision |
131−| c790a9f | 2026-10-31 | Expose transparent `poke` from the internal prelude |
132−| ef4772a | 2026-10-31 | Bridge imported loobeans and loobean singletons |
133−| ad46655 | 2026-10-31 | Bridge selected imported any-noun molds |
134−| beada10 | 2026-10-31 | Import source-proved Ford mark unions, analyze API paths and infer list helpers |
135−| e28f7be | 2026-10-31 | Diagnose proven non-gate cycles and import Tlon null-payload union cases |
136−| fd2f288 | 2026-10-31 | Infer qualified fields of imported values |
137−| ed9291e | 2026-10-31 | Infer term-headed pairs and function helpers, and import nested named unions |
138−| ad0265e | 2026-10-31 | Infer proven single-case patterns and the prelude command union |
139−| 413b12b | 2026-10-31 | Propagate known result context into generic calls and batch ship deletions |
140−| c690076 | 2026-10-31 | Propagate loobean context, infer predicate helpers, and import named ordered-map operands |
141−| 0bf6178 | 2026-10-31 | Bridge recursive Tlon lists and prepare a private comparison interface |
142−| 4e472b5 | 2026-10-31 | Pass known named unions through polymorphic gates |
143−| e3e184f | 2026-10-31 | Parse type holes, reject duplicate written record fields, and extend partial union inference and imports |
144−| 80e221a | 2026-10-31 | Infer supported annotation holes and prelude list aliases |
145−| ba1fec4 | 2026-10-31 | Add the curried `bond` prelude gate |
146−| 0ea700d | 2026-10-31 | Infer a source-defined recursive `qath` subset and record the explicit `proj` decision |
147−| 75f5952 | 2026-10-31 | Check a subset of explicit `proj` calls and retain their lowering evidence |
148−| cf17925 | 2026-10-31 | Infer supported single-field projections |
149−| 1a891e2 | 2026-10-31 | Infer source-backed addition and decrement without loobean operands; record the watchability decision |
150−| 81af5fd | 2026-10-31 | Preserve public names of identity-generic union aliases and record the `like` decision |
151−| 640a442 | 2026-10-31 | Add the source-backed `like` result mapper and infer supported positional calls |
152−| 445a0a1 | 2026-10-31 | Retain source-backed API path evidence and classify declarations |
153−| f69493d | 2026-10-31 | Derive supported request components from API declarations |
154−| f0f6954 | 2026-10-31 | Analyze supported API helper definitions and declared marks |
155−| 3f55af7 | 2026-10-31 | Define source-backed transparent ask and pure |
156−| ae1ec26 | 2026-10-31 | Prove selected default-wrapped Hoon unions from source |
157−| dde791c | 2026-10-31 | Infer a source-backed request-gate type through ordinary imports |
158−| a1c5f35 | 2026-10-31 | Infer supported multi-path requests and named closed folds |
159−| 911ca0c | 2026-10-31 | Propagate union context, define subscriptions and match literal nouns |
160−| 72acdb3 | 2026-10-31 | Infer selected nested union payloads from context |
161−| This change | 2026-10-31 | Analyze gate-free source molds with field witnesses |
162
72
163## Checking it
73## Checking it
164
74
165On a machine set up as [development.md](development.md) says:
75On a machine set up as [development.md](development.md) says:
166
76
167```
77```
168−tools/golden # 649 cases under urbit eval
78+tools/golden # 468 cases under urbit eval
169tools/importer-test # the Hoon importer fixture projection
79tools/importer-test # the Hoon importer fixture projection
170−tools/type-import-default-test # default-wrapped source proof golden
171tools/type-import-test # the importer/checker bridge fixture
80tools/type-import-test # the importer/checker bridge fixture
172−tools/type-tlon-test # the real Tlon reader/checker fixture
173tools/type-mark-test # the mark/checker bridge fixture
81tools/type-mark-test # the mark/checker bridge fixture
174−tools/type-poke-test # the source-backed poke/API fixture
175−tools/type-api-evidence-test # API declaration evidence guards
176−tools/type-api-paths-test # partial API path metadata fixture
177−tools/type-hole-guards-test # hole defaulting and API interface guards
178−tools/type-list-alias-test # prelude list-alias guards
179−tools/type-generic-alias-test # generic union alias guards
180−tools/type-positional-face-guards-test # positional sample face guards
181−tools/type-qath-guards-test # qath source and unfolding guards
182−tools/type-ask-guards-test # ask source and bootstrap guards
183−tools/type-proj-guards-test # projection evidence and scope guards
184tools/type-module-scope-test # module and prelude scope fixture
82tools/type-module-scope-test # module and prelude scope fixture
185tools/hoon check-spans-test # prints <<>> when the span checker works
83tools/hoon check-spans-test # prints <<>> when the span checker works
186tools/testdata/selftest # the tools themselves
84tools/testdata/selftest # the tools themselves
187tools/doc-blocks docs/spec # the doc's examples are golden cases
85tools/doc-blocks docs/spec # the doc's examples are golden cases
188tools/ship start
86tools/ship start
189tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
87tools/ship gen-tests --check # tests/lib/jibb.hoon is up to date
190−tools/ship test # the same 649 cases as -test arms on the ship
88+tools/ship test # the same 468 cases as -test arms on the ship
191tools/testdata/ship-selftest
89tools/testdata/ship-selftest
192−tools/testdata/clay-fixtures-selftest # scratch fixture cleanup without a ship
193tools/ship check-commit # |commit stores .jibb files
90tools/ship check-commit # |commit stores .jibb files
194tools/clay-fixtures # example /sur files and marks build through Clay
91tools/clay-fixtures # example /sur files and marks build through Clay
195```
92```
jibb-dev/lib/jibb-import.hoon+36−866
@@ -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
@@ -17,18 +16,14 @@
17:: other nested forms and unprovably disjoint cases remain unsupported. Source-level overlap in
16:: other nested forms and unprovably disjoint cases remain unsupported. Source-level overlap in
18:: other unions, general nested ordered maps, broader Ford subject
17:: other unions, general nested ordered maps, broader Ford subject
19:: shapes, ambiguous recursive origins and full error locations still
18:: shapes, ambiguous recursive origins and full error locations still
20−:: need work. One direct union argument to a standard collection is
21−:: recovered only from its exact call wrapper, static independent cases,
22−:: proven disjoint branches and unshadowed standard names. Other source
23−:: shapes fail closed. A nested ordered map is recovered only when its key and
19+:: need work. A nested ordered map is recovered only when its key and
24:: value are fixed atom molds and
20:: value are fixed atom molds and
25:: the other fields are fixed atoms or collections of static atoms;
21:: the other fields are fixed atoms or collections of static atoms;
26:: other source shapes fail closed.
22:: other source shapes fail closed.
27::
23::
28−:: The partial checker bridges supported nouns, atoms, cells, faces,
24+:: The checker has a small bridge for successful unfaced atom and cell
29−:: proven forks and collections, and keeps proven recursive roots nominal.
25+:: 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.
26+:: partial tree is returned as success.
32::
27::
33|%
28|%
34+$ imported
29+$ imported
@@ -39,16 +34,9 @@
39 [%cell head=imported tail=imported]
34 [%cell head=imported tail=imported]
40 [%face name=term body=imported]
35 [%face name=term body=imported]
41 [%fork cases=(list imported)]
36 [%fork cases=(list imported)]
42− [%named module=term name=term body=imported]
43 [%apply name=term args=(list imported)]
37 [%apply name=term args=(list imported)]
44 [%ref module=term name=term]
38 [%ref module=term name=term]
45 [%bad reason=@t]
39 [%bad reason=@t]
46− [%invalid code=?(%aura %core) reason=@t]
47− ==
48−+$ import-diagnostic
49− $% [%ok value=imported]
50− [%invalid code=?(%aura %core) message=@t]
51− [%unsupported message=@t]
52 ==
40 ==
53+$ signatures (list [name=term code=hoon])
41+$ signatures (list [name=term code=hoon])
54+$ visiting (list [typ=type name=(unit term)])
42+$ visiting (list [typ=type name=(unit term)])
@@ -79,274 +67,6 @@
79 ^- (each imported @t)
67 ^- (each imported @t)
80 (read-with module name typ ~)
68 (read-with module name typ ~)
81::
69::
82−:: When Hoon's expanded type has lost source cases, inspect the exact
83−:: selected local arm. Restrict this fallback to distinct literal head tags
84−:: and proven-safe dependencies, then verify each projected branch again.
85−+$ tagged-case [tag=@ branch=spec]
86−:: Clay and eval expose different versions of the spec union. Inspect help
87−:: and source-location wrappers as nouns before checking their contained spec.
88−++ source-gist-tail
89− |= raw=*
90− ^- (unit *)
91− ?: ?=([%gist [%help *] *] raw) `+.+.raw
92− ?: ?=([%dbug * *] raw) `+.+.raw
93− ~
94−::
95−:: Bound metadata work separately from semantic source-node visits.
96−++ source-unwrap
97− |= [raw=* left=@ud]
98− ^- (unit *)
99− =/ wrapper=(unit *) (source-gist-tail raw)
100− ?~ wrapper `raw
101− ?: =(left 0) ~
102− $(raw u.wrapper, left (dec left))
103−::
104−++ tagged-term
105− |= leaf=spec
106− ^- (unit @)
107− =/ plain=(unit *) (source-unwrap leaf 4)
108− ?~ plain ~
109− ?. ?=([%leaf %tas @] u.plain) ~
110− `+.+.u.plain
111−::
112−++ tagged-head
113− |= branch=spec
114− ^- (unit @)
115− =/ plain=(unit *) (source-unwrap branch 4)
116− ?~ plain ~
117− =. branch ;;(spec u.plain)
118− ?+ branch ~
119− [%bccl *]
120− ?~ t.p.branch ~
121− (tagged-term i.p.branch)
122− ==
123−::
124−++ tagged-cases
125− |= [cases=(list spec) tags=(list @)]
126− ^- (unit (list tagged-case))
127− ?~ cases `~
128− ?: |((has-spec-cell-union i.cases) (has-spec-general-union i.cases)) ~
129− =/ tag=(unit @) (tagged-head i.cases)
130− ?~ tag ~
131− ?: (lien tags |=(x=@ =(x u.tag))) ~
132− =/ rest $(cases t.cases, tags [u.tag tags])
133− ?~ rest ~
134− `[[u.tag i.cases] u.rest]
135−::
136−:: Benign source annotations have different typed representations on
137−:: Clay and under eval. Inspect the wrapper as a noun, and validate the
138−:: contained Hoon before examining an arm.
139−++ source-note-tail
140− |= raw=*
141− ^- (unit *)
142− ?: ?=([%note [%help *] *] raw) `+.+.raw
143− ?: ?=([%dbug * *] raw) `+.+.raw
144− ~
145−::
146−++ source-note-unwrap
147− |= [raw=* left=@ud]
148− ^- (unit *)
149− =/ wrapper=(unit *) (source-note-tail raw)
150− ?~ wrapper `raw
151− ?: =(left 0) ~
152− $(raw u.wrapper, left (dec left))
153−::
154−:: A bounded $~ source wrapper changes the default, not the mold.
155−:: Each annotation chain and default chain is separately bounded.
156−++ tagged-default-union
157− |= [body=spec left=@ud]
158− ^- (unit spec)
159− =/ plain=(unit *) (source-unwrap body 4)
160− ?~ plain ~
161− =. body ;;(spec u.plain)
162− ?. ?=([%bcsg *] body) `body
163− ?: =(left 0) ~
164− $(body q.body, left (dec left))
165−::
166−++ tagged-source-code
167− |= [code=hoon name=term]
168− ^- (unit (list tagged-case))
169− =/ found=(unit spec) (local-mold-spec code name)
170− ?~ found ~
171− =/ body=(unit spec) (tagged-default-union u.found 4)
172− ?~ body ~
173− ?. ?=([%bccn *] u.body) ~
174− =/ cases=(list spec) p.u.body
175− ?~ cases ~
176− ?~ t.cases ~
177− (tagged-cases cases ~)
178−::
179−:: Source proof for dependencies of an explicitly tagged union. Only
180−:: simple local molds, standard collections and distinct term enums are
181−:: accepted; computed molds, nested cell unions and cycles fail closed.
182−:: One shared fuel budget bounds repeated visits through acyclic aliases;
183−:: exhaustion or an inherited same-name arm leaves the result unsupported.
184−++ local-arm-source
185− |= [cor=type name=term]
186− ^- (unit hoon)
187− ?. ?=([%core *] cor) ~
188− =/ chapters=(map term tome) q.r.q.cor
189− =/ all=(list [term tome]) ~(tap by chapters)
190− ?: (lien all |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
191− =/ chapter=(unit tome) (~(get by chapters) %$)
192− ?~ chapter ~
193− (chapter-source u.chapter name)
194−::
195−++ local-mold-spec
196− |= [code=hoon name=term]
197− ^- (unit spec)
198− =/ plain=(unit *) (source-note-unwrap code 4)
199− ?~ plain ~
200− =. code ;;(hoon u.plain)
201− ?+ code ~
202− [%ktcl *]
203− ?. ?=([%name * *] p.code) ~
204− ?. =(name p.p.code) ~
205− `q.p.code
206− ==
207−::
208−++ safe-source-enum
209− |= [cases=(list spec) seen=(list @) fuel=@ud]
210− ^- (unit @ud)
211− ?~ cases `fuel
212− ?: =(fuel 0) ~
213− =/ tag=(unit @) (tagged-term i.cases)
214− ?~ tag ~
215− ?: (lien seen |=(n=@ =(n u.tag))) ~
216− $(cases t.cases, seen [u.tag seen], fuel (dec fuel))
217−::
218−++ safe-source-specs-mode
219− |= [xs=(list spec) cor=type seen=(list term) fuel=@ud allow-nested=?]
220− ^- (unit @ud)
221− ?~ xs `fuel
222− =/ left=(unit @ud) (safe-source-spec-mode i.xs cor seen fuel allow-nested)
223− ?~ left ~
224− $(xs t.xs, fuel u.left)
225−::
226−++ safe-source-name-mode
227− |= [name=term cor=type seen=(list term) fuel=@ud allow-nested=?]
228− ^- (unit @ud)
229− :: Permit a direct root revisit or one proven nested self-revisit.
230− :: Mutual cycles and inherited same-name bindings remain unavailable.
231− ?: (lien seen |=(x=term =(name x)))
232− ?. ?=([%core *] cor) ~
233− ?. (scope-safe p.cor name) ~
234− ?: =(seen ~[name]) `fuel
235− ?. allow-nested ~
236− ?. ?=([* [* ~]] seen) ~
237− ?. =(i.seen name) ~
238− =/ selected=(unit hoon) (local-arm-source cor name)
239− ?~ selected ~
240− =/ cases=(unit (list tagged-case)) (tagged-source-code u.selected name)
241− ?~ cases ~
242− `fuel
243− =/ arm=(unit hoon) (local-arm-source cor name)
244− ?~ arm
245− ?. &(|(=(name %ship) =(name %path)) (scope-safe cor name)) ~
246− `fuel
247− ?. ?=([%core *] cor) ~
248− ?. (scope-safe p.cor name) ~
249− =/ body=(unit spec) (local-mold-spec u.arm name)
250− ?~ body ~
251− (safe-source-spec-mode u.body cor [name seen] fuel allow-nested)
252−::
253−++ safe-source-spec-mode
254− |= [shape=spec cor=type seen=(list term) fuel=@ud allow-nested=?]
255− ^- (unit @ud)
256− =/ plain=(unit *) (source-unwrap shape 4)
257− ?~ plain ~
258− =. shape ;;(spec u.plain)
259− ?: =(fuel 0) ~
260− =. fuel (dec fuel)
261− ?+ shape ~
262− [%base *] ?:(|(?=([%atom *] p.shape) =(%flag p.shape) =(%null p.shape)) `fuel ~)
263− [%leaf *] `fuel
264− [%bcsg *] $(shape q.shape)
265− [%bcts *] ?@ p.shape $(shape q.shape)
266− ~
267− [%bccl *] (safe-source-specs-mode p.shape cor seen fuel allow-nested)
268− [%bccn *]
269− :: A source proof may cross one named union dependency. Deeper
270− :: named unions stay unsupported to bound recursive reprojection.
271− ?. allow-nested ~
272− ?. ?=([* [* ~]] seen) ~
273− =/ cases=(unit (list tagged-case)) (tagged-cases p.shape ~)
274− ?~ cases ~
275− ?~ u.cases ~
276− ?~ t.u.cases ~
277− (safe-source-tagged-fuel-mode u.cases cor seen fuel allow-nested)
278− [%bcwt *] (safe-source-enum p.shape ~ fuel)
279− [%like *]
280− ?. ?=([@ ~] p.shape) ~
281− ?. ?=(~ q.shape) ~
282− (safe-source-name-mode i.p.shape cor seen fuel allow-nested)
283− [%make *]
284− =/ wing=(unit term) (source-single-wing p.shape)
285− ?~ wing ~
286− =/ n=term u.wing
287− ?. (lien `(list term)`~[%map %set %qeu %list %unit %jar %jug] |=(x=term =(x n))) ~
288− ?. (scope-safe cor n) ~
289− (safe-source-specs-mode q.shape cor seen fuel allow-nested)
290− ==
291−::
292−++ safe-source-tagged-fuel-mode
293− |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud allow-nested=?]
294− ^- (unit @ud)
295− ?~ cases `fuel
296− =/ left=(unit @ud) (safe-source-spec-mode branch.i.cases cor seen fuel allow-nested)
297− ?~ left ~
298− $(cases t.cases, fuel u.left)
299−::
300−++ safe-source-name
301− |= [name=term cor=type seen=(list term) fuel=@ud]
302− ^- (unit @ud)
303− (safe-source-name-mode name cor seen fuel &)
304−::
305−++ safe-source-tagged
306− |= [cases=(list tagged-case) cor=type seen=(list term) fuel=@ud]
307− ^- ?
308− ?=(^ (safe-source-tagged-fuel-mode cases cor seen fuel &))
309−::
310−++ tagged-union-fallback
311− |= [module=term name=term cor=type]
312− ^- (unit (each imported @t))
313− ?. ?=([%core *] cor) ~
314− =/ chapters=(map term tome) q.r.q.cor
315− =/ other=(list [term tome]) ~(tap by chapters)
316− ?: (lien other |=(e=[term tome] &(!=(-.e %$) (chapter-unsafe +.e name)))) ~
317− =/ chapter=(unit tome) (~(get by chapters) %$)
318− ?~ chapter ~
319− =/ selected=(unit hoon) (chapter-source u.chapter name)
320− ?~ selected ~
321− =/ cases (tagged-source-code u.selected name)
322− ?~ cases ~
323− :: Preserve the original budget when no nested union recovery is needed.
324− =/ plain=? ?=(^ (safe-source-tagged-fuel-mode u.cases cor ~[name] 4.096 |))
325− ?. |(plain (safe-source-tagged u.cases cor ~[name] 256)) ~
326− =/ tried=(each (list type) tang)
327− (mule |.((turn u.cases |=(c=tagged-case (~(play ut cor) [%kttr branch.c])))))
328− ?. ?=([%& *] tried) ~
329− :: Record the selected hold before projecting branches so an exact
330− :: recursive revisit can retain its independently verified origin.
331− =/ selected-type=(each type tang)
332− (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
333− ?. ?=([%& *] selected-type) ~
334− =/ projected=(each (list imported) tang)
335− (mule |.((turn p.tried |=(t=type (walk module t catalog ~[[p.selected-type [~ name]]] `cor)))))
336− ?. ?=([%& *] projected) ~
337− ?^ (first-bads p.projected) ~
338− ?. (all-disjoint p.projected) ~
339− =/ xs=(list tagged-case) u.cases
340− =/ ys=(list imported) p.projected
341− |-
342− ?~ xs
343− ?^ ys ~
344− `[%& [%fork (sort p.projected |=(pair=[imported imported] (dor -.pair +.pair)))]]
345− ?~ ys ~
346− ?. ?=([%cell [%atom %tas [~ @]] *] i.ys) ~
347− ?. =(tag.i.xs u.value.head.i.ys) ~
348− $(xs t.xs, ys t.ys)
349−::
350:: +read-mold-in: accept the /sur core as provenance. The core must be
70:: +read-mold-in: accept the /sur core as provenance. The core must be
351:: built against zuse or validated Ford imports, and its selected arm
71:: built against zuse or validated Ford imports, and its selected arm
352:: must be this type. Unknown subject shapes fail closed.
72:: must be this type. Unknown subject shapes fail closed.
@@ -362,12 +82,8 @@
362 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
82 ?. =(typ (~(play ut cor) (ream (cat 3 '*' name))))
363 [%| 'Hoon module provenance does not match the selected mold']
83 [%| 'Hoon module provenance does not match the selected mold']
364 =/ result (read-with module name typ [~ cor])
84 =/ result (read-with module name typ [~ cor])
365− ?: ?=([%& *] result) result
85+ ?. ?=([%& *] result) result
366− =/ fallback=(each (unit (each imported @t)) tang)
367− (mule |.((tagged-union-fallback module name cor)))
368− ?: ?=(%| -.fallback) result
369− ?~ p.fallback result
86+ result
370− u.p.fallback
371::
87::
372:: +read-named is the source-aware entry point for callers that have
88:: +read-named is the source-aware entry point for callers that have
373:: not selected a Hoon type yet. Check the core and the local arm
89:: not selected a Hoon type yet. Check the core and the local arm
@@ -396,41 +112,6 @@
396:: A mark door's payload is [sample build-subject]. Its outer sample
112:: A mark door's payload is [sample build-subject]. Its outer sample
397:: face names the door sample, not the imported mark type. Collection
113:: face names the door sample, not the imported mark type. Collection
398:: lookup for the sample happened against the pre-door build subject.
114:: lookup for the sample happened against the pre-door build subject.
399−:: Fallback for a mark whose sample is exactly one arm of its only
400−:: Ford-imported /sur core. Source validation remains in read-mold-in.
401−:: Recursive results need a separate mark-origin/interface design.
402−++ mark-has-ref
403− |= node=imported
404− ^- ?
405− ?- node
406− [%ref *] &
407− [%named *] $(node body.node)
408− [%face *] $(node body.node)
409− [%cell *] |($(node head.node) $(node tail.node))
410− [%fork *] (lien cases.node |=(child=imported (mark-has-ref child)))
411− [%apply *] (lien args.node |=(child=imported (mark-has-ref child)))
412− * |
413− ==
414−::
415−++ mark-union-fallback
416− |= [raw=type context=type]
417− ^- (unit (each imported @t))
418− ?. ?=([%cell [%face @ [%core *]] *] context) ~
419− ?. =(q.context -:!>(..zuse)) ~
420− =/ alias=term p.p.context
421− =/ core=type q.p.context
422− ?. ?=([%hold *] raw) ~
423− =/ name=(unit term) (hold-name q.raw)
424− ?~ name ~
425− =/ selected=(each type tang)
426− (mule |.((~(play ut core) (ream (cat 3 '*' u.name)))))
427− ?. ?=([%& *] selected) ~
428− ?. =(p.selected raw) ~
429− =/ result=(each imported @t) (read-mold-in alias u.name raw core)
430− ?. ?=([%& [%fork *]] result) ~
431− ?: (mark-has-ref p.result) ~
432− `result
433−::
434++ read-mark
115++ read-mark
435 |= [name=term cor=type]
116 |= [name=term cor=type]
436 ^- (each imported @t)
117 ^- (each imported @t)
@@ -441,48 +122,8 @@
441 =/ sample=type p.p.cor
122 =/ sample=type p.p.cor
442 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
123 =/ raw=type ?:(?=([%face *] sample) q.sample sample)
443 =/ result (read-with name name raw [~ q.p.cor])
124 =/ result (read-with name name raw [~ q.p.cor])
444− ?: ?=([%& *] result) result
125+ ?. ?=([%& *] result) result
445− =/ fallback=(each (unit (each imported @t)) tang)
126+ result
446− (mule |.((mark-union-fallback raw q.p.cor)))
447− ?: ?=(%| -.fallback) result
448− ?~ p.fallback result
449− u.p.fallback
450−::
451−++ read-named-diagnostic
452− |= [module=term name=term cor=type]
453− ^- import-diagnostic
454− =/ result=(each imported @t) (read-named module name cor)
455− ?: ?=(%& -.result) [%ok p.result]
456− ?. ?=([%core *] cor) [%unsupported p.result]
457− ?: =(cor -:!>(..zuse)) [%unsupported p.result]
458− ?. (scope-safe cor %$) [%unsupported p.result]
459− =/ chapters=(map term tome) q.r.q.cor
460− ?. (lien ~(tap by chapters) |=(entry=[term tome] =((chapter-has +.entry name) [~ &])))
461− [%unsupported p.result]
462− =/ selected=(each type tang) (mule |.((~(play ut cor) (ream (cat 3 '*' name)))))
463− ?. ?=(%& -.selected) [%unsupported p.result]
464− =/ again=(each imported tang) (mule |.((walk module p.selected catalog ~ [~ cor])))
465− ?. ?=(%& -.again) [%unsupported p.result]
466− =/ evidence=(unit import-diagnostic) (first-invalid p.again)
467− ?~ evidence [%unsupported p.result]
468− u.evidence
469−::
470−++ read-mark-diagnostic
471− |= [name=term cor=type]
472− ^- import-diagnostic
473− =/ result=(each imported @t) (read-mark name cor)
474− ?: ?=(%& -.result) [%ok p.result]
475− ?. ?=([%core *] cor) [%unsupported p.result]
476− ?. ?=([%cell *] p.cor) [%unsupported p.result]
477− ?. =(p.cor q.q.cor) [%unsupported p.result]
478− ?. (scope-safe q.p.cor %$) [%unsupported p.result]
479− =/ sample=type p.p.cor
480− =/ raw=type ?:(?=([%face *] sample) q.sample sample)
481− =/ again=(each imported tang) (mule |.((walk name raw catalog ~ [~ q.p.cor])))
482− ?. ?=(%& -.again) [%unsupported p.result]
483− =/ evidence=(unit import-diagnostic) (first-invalid p.again)
484− ?~ evidence [%unsupported p.result]
485− u.evidence
486::
127::
487++ read-with
128++ read-with
488 |= [module=term name=term typ=type context=(unit type)]
129 |= [module=term name=term typ=type context=(unit type)]
@@ -742,8 +383,9 @@
742 ?: ?=([%bckt ^ ^] h) &
383 ?: ?=([%bckt ^ ^] h) &
743 |($(h -.h) $(h +.h))
384 |($(h -.h) $(h +.h))
744::
385::
745−:: The Grammar's disjointness rule applies to imported $% and $? too;
386+:: (doc question 22) The Grammar's disjointness rule is applied to
746−:: @iko confirmed the rule for imported unions on 2026-10-30.
387+:: imported $% and $? too. The import table singles out $^, so @iko
388+:: has been asked whether that general rule also covers those unions.
747++ has-spec-general-union
389++ has-spec-general-union
748 |= h=*
390 |= h=*
749 ^- ?
391 ^- ?
@@ -901,8 +543,8 @@
901 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
543 ?. |(=(p.h [%dtwt [%$ (mul 2 axis)]]) (fits-union-at p.h axis))
902 [%| 'a Hoon union needs a source-level disjointness check']
544 [%| 'a Hoon union needs a source-level disjointness check']
903 ?. (disjoint a b)
545 ?. (disjoint a b)
904− ?: ?=([%fits *] p.h) [%| 'Hoon union disjointness could not be verified']
546+ ?: ?=([%fits *] p.h) [%| 'a Hoon union has overlapping cases']
905− [%| 'Hoon $^ union disjointness could not be verified']
547+ [%| 'a Hoon $^ union has overlapping cases']
906 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
548 [%& [%fork (sort (weld (union-cases a) (union-cases b)) |=(pair=[imported imported] (dor -.pair +.pair)))]]
907 ==
549 ==
908++ union-cases
550++ union-cases
@@ -923,8 +565,6 @@
923 ^- ?
565 ^- ?
924 ?: ?=([%face *] a) $(a body.a)
566 ?: ?=([%face *] a) $(a body.a)
925 ?: ?=([%face *] b) $(b body.b)
567 ?: ?=([%face *] b) $(b body.b)
926− ?: ?=([%named *] a) $(a body.a)
927− ?: ?=([%named *] b) $(b body.b)
928 ?: ?=([%fork *] a)
568 ?: ?=([%fork *] a)
929 (levy cases.a |=(item=imported (disjoint item b)))
569 (levy cases.a |=(item=imported (disjoint item b)))
930 ?: ?=([%fork *] b)
570 ?: ?=([%fork *] b)
@@ -979,32 +619,6 @@
979 ?. (arm-map-valid +.chapter) ~
619 ?. (arm-map-valid +.chapter) ~
980 [~ (arm-map-has +.chapter target)]
620 [~ (arm-map-has +.chapter target)]
981::
621::
982−:: Return a unique source arm from either validated tome wrapper. Walk
983−:: the noun map rather than relying on fields that differ on Clay.
984−++ arm-map-sources
985− |= [m=* target=term]
986− ^- (list hoon)
987− ?@ m ~
988− =/ kv=* -.m
989− =/ children=* +.m
990− =/ found=(list hoon) ?:(=(-.kv target) ~[;;(hoon +.kv)] ~)
991− (weld found (weld $(m -.children) $(m +.children)))
992−::
993−++ chapter-source
994− |= [chapter=* target=term]
995− ^- (unit hoon)
996− ?: (arm-map-valid chapter) (unique-arm-source chapter target)
997− ?@ chapter ~
998− ?. (arm-map-valid +.chapter) ~
999− (unique-arm-source +.chapter target)
1000−::
1001−++ unique-arm-source
1002− |= [arms=* target=term]
1003− ^- (unit hoon)
1004− =/ sources=(list hoon) (arm-map-sources arms target)
1005− ?. ?=([* ~] sources) ~
1006− `i.sources
1007−::
1008++ chapter-unsafe
622++ chapter-unsafe
1009 |= [chapter=* target=term]
623 |= [chapter=* target=term]
1010 ^- ?
624 ^- ?
@@ -1047,46 +661,17 @@
1047 ?@ src |
661 ?@ src |
1048 |($(src -.src) $(src +.src))
662 |($(src -.src) $(src +.src))
1049::
663::
1050−:: Clay can wrap each call component in source-location metadata.
1051−:: Peel only those wrappers; malformed casts are trapped by +mop-specs.
1052−++ mop-source-code
1053− |= code=hoon
1054− ^- hoon
1055− =/ plain=(unit *) (source-unwrap code 4)
1056− ?~ plain !!
1057− ;;(hoon u.plain)
1058−::
1059−++ source-single-wing
1060− |= raw=*
1061− ^- (unit term)
1062− =/ plain=(unit *) (source-unwrap raw 4)
1063− ?~ plain ~
1064− ?. ?=([%wing [@ ~]] u.plain) ~
1065− `;;(term -.+.u.plain)
1066−::
1067++ mop-specs-raw
664++ mop-specs-raw
1068 |= body=hoon
665 |= body=hoon
1069 ^- (unit [key=spec value=spec])
666 ^- (unit [key=spec value=spec])
1070− =. body (mop-source-code body)
1071 ?. ?=([%cncl *] body) ~
667 ?. ?=([%cncl *] body) ~
1072 ?. ?=([%tsgr *] p.body) ~
668 ?. ?=([%tsgr *] p.body) ~
1073− =/ b=hoon (mop-source-code q.p.body)
669+ =/ b=hoon q.p.body
1074 ?. ?=([%cncl *] b) ~
670 ?. ?=([%cncl *] b) ~
1075− =/ call=hoon (mop-source-code p.b)
1076− ?. ?=([%cncl *] call) ~
671+ ?. ?=([%cncl *] p.b) ~
1077− =/ w=(unit term) (source-single-wing p.call)
672+ ?. ?=([%wing *] p.p.b) ~
1078− ?~ w ~
1079− ?. =(u.w %mop) ~
673+ ?. =(p.p.p.b ~[%mop]) ~
1080− =/ raw=* q.call
674+ =/ specs=(list spec) ;;((list spec) q.p.b)
1081− =/ wings=(unit [key=spec value=spec])
1082− ?. ?=([* [* ~]] raw) ~
1083− =/ a=(unit term) (source-single-wing -.raw)
1084− =/ b=(unit term) (source-single-wing -.+.raw)
1085− ?~ a ~
1086− ?~ b ~
1087− [~ [[%like ~[u.a] ~] [%like ~[u.b] ~]]]
1088− ?^ wings wings
1089− =/ specs=(list spec) ;;((list spec) raw)
1090 ?. ?=([* [* ~]] specs) ~
675 ?. ?=([* [* ~]] specs) ~
1091 [~ [i.specs i.t.specs]]
676 [~ [i.specs i.t.specs]]
1092::
677::
@@ -1179,166 +764,6 @@
1179 ?. (levy t.found same) ~
764 ?. (levy t.found same) ~
1180 [~ choice]
765 [~ choice]
1181::
766::
1182−::
1183−:: A collection case is independent of the subject only when its
1184−:: original spec uses literal atoms, tags and finite record structure.
1185−++ static-union-spec
1186− |= s=spec
1187− ^- ?
1188− ?+ s |
1189− [%base *] ?=([%atom *] p.s)
1190− [%leaf *] &
1191− [%bcts *] ?@ p.s $(s q.s)
1192− |
1193− [%bccl *] (static-union-specs p.s)
1194− ==
1195−::
1196−++ static-union-specs
1197− |= parts=(list spec)
1198− ^- ?
1199− ?~ parts &
1200− &((static-union-spec i.parts) $(parts t.parts))
1201−::
1202−++ union-spec-parts
1203− |= s=spec
1204− ^- (unit (list spec))
1205− ?+ s ~
1206− [%bcwt *] [~ p.s]
1207− [%bccn *] [~ p.s]
1208− [%bckt *] [~ ~[p.s q.s]]
1209− ==
1210−::
1211−:: Select one direct union argument, replacing exactly that spec with
1212−:: @t. The other arguments must be static and cannot contain unions.
1213−++ safe-union-parts
1214− |= cases=(list spec)
1215− ^- ?
1216− ?~ cases |
1217− ?~ t.cases |
1218− =/ rest=(list spec) t.cases
1219− &((static-union-spec i.cases) (levy rest |=(part=spec (static-union-spec part))))
1220−::
1221−++ split-union-arguments
1222− |= [args=(list hoon) index=@ud]
1223− ^- (unit [args=(list hoon) cases=(list spec) index=@ud])
1224− ?~ args ~
1225− ?. ?=([%ktcl *] i.args) ~
1226− =/ cases (union-spec-parts p.i.args)
1227− ?^ cases
1228− ?. (safe-union-parts u.cases) ~
1229− ?. (static-arguments t.args) ~
1230− [~ [[[%ktcl [%base [%atom %t]]] t.args] u.cases index]]
1231− ?. (static-spec p.i.args) ~
1232− =/ rest $(args t.args, index +(index))
1233− ?~ rest ~
1234− [~ [[i.args args.u.rest] cases.u.rest index.u.rest]]
1235−::
1236−++ replace-union-argument
1237− |= [args=(list imported) index=@ud union=imported]
1238− ^- (unit (list imported))
1239− ?~ args ~
1240− ?: =(index 0)
1241− ?. =([%atom %t ~] i.args) ~
1242− [~ [union t.args]]
1243− =/ rest $(args t.args, index (dec index))
1244− ?~ rest ~
1245− [~ [i.args u.rest]]
1246−::
1247−:: Accept only the compiler's direct collection call wrapper.
1248−++ direct-collection-source
1249− |= [body=hoon original=hoon]
1250− ^- ?
1251− ?. ?=([%cncl [%tsgr * [%cncl *]] *] body) |
1252− ?. =(p.p.body [%wing ~[[%.y 7]]]) |
1253− ?. =(q.body ~[[%$ 6]]) |
1254− ?. ?=([%tsls * *] original) |
1255− =(q.original [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]])
1256−::
1257−++ collection-union
1258− |= [typ=type module=term sig=signatures seen=visiting context=(unit type)]
1259− ^- imported
1260− ?. ?=([%hold *] typ) [%bad 'a Hoon union needs a source-level disjointness check']
1261− =/ is-cell=? (has-spec-cell-union q.typ)
1262− =/ unsupported=@t
1263− ?: is-cell 'a Hoon $^ union needs a source-level disjointness check'
1264− 'a Hoon union needs a source-level disjointness check'
1265− =/ original=hoon q.typ
1266− ?. ?=([%tsls [%note * *] *] original) [%bad unsupported]
1267− =/ body=hoon q.p.original
1268− =/ alias (source-alias body)
1269− ?~ alias [%bad unsupported]
1270− ?. (alias-safe context u.alias) [%bad 'Hoon collection provenance is unavailable or shadowed']
1271− =/ names=(list term) ~[%map %set %qeu %list %unit %jar %jug]
1272− ?: (lien names |=(n=term &((source-uses body n) !(alias-safe context n))))
1273− [%bad 'Hoon collection provenance is unavailable or shadowed']
1274− ?. (direct-collection-source body original) [%bad unsupported]
1275− ?> ?=([%cncl [%tsgr * [%cncl *]] *] body)
1276− =/ split (split-union-arguments q.q.p.body 0)
1277− ?~ split [%bad unsupported]
1278− =/ tried=(each (list type) tang)
1279− (mule |.((turn cases.u.split |=(s=spec (~(play ut p.typ) [%kttr s])))))
1280− ?. ?=([%& *] tried) [%bad unsupported]
1281− =/ cases=(list imported)
1282− (turn p.tried |=(t=type (walk module t sig seen context)))
1283− =/ err (first-bads cases)
1284− ?^ err [%bad u.err]
1285− ?. (all-disjoint cases)
1286− [%bad ?:(is-cell 'Hoon $^ union disjointness could not be verified' 'Hoon union disjointness could not be verified')]
1287− =/ rewritten=hoon original(q.p body(q.q.p args.u.split))
1288− =/ attempt=(each type tang) (mule |.((~(play ut p.typ) rewritten)))
1289− ?. ?=([%& *] attempt) [%bad unsupported]
1290− =/ out=imported (walk module p.attempt sig seen context)
1291− ?. ?=([%apply *] out) [%bad unsupported]
1292− ?. =(name.out u.alias) [%bad unsupported]
1293− =/ replacement=imported
1294− [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
1295− =/ args (replace-union-argument args.out index.u.split replacement)
1296− ?~ args [%bad unsupported]
1297− [%apply name.out u.args]
1298−::
1299−:: A nested named tagged union may be recovered only if its hold is
1300−:: exactly the selected arm of this core. Provenance and all original
1301−:: source cases are checked by the same fallback as a top-level arm.
1302−++ nested-tagged-union
1303− |= [module=term typ=type context=(unit type)]
1304− ^- (unit imported)
1305− ?~ context ~
1306− ?. ?=([%core *] u.context) ~
1307− ?. ?=([%hold *] typ) ~
1308− =/ n=(unit term) (hold-name q.typ)
1309− ?~ n ~
1310− :: The outer proof has a shared budget. Bound each nested re-proof as
1311− :: well, so rebuilding a shared source DAG cannot grow without limit.
1312− =/ source=(unit hoon) (local-arm-source u.context u.n)
1313− ?~ source ~
1314− =/ cases=(unit (list tagged-case)) (tagged-source-code u.source u.n)
1315− ?~ cases ~
1316− ?. (safe-source-tagged u.cases u.context ~[u.n] 256) ~
1317− =/ selected=(each type tang)
1318− (mule |.((~(play ut u.context) (ream (cat 3 '*' u.n)))))
1319− ?. ?=([%& *] selected) ~
1320− ?. =(p.selected typ) ~
1321− =/ attempt=(each (unit (each imported @t)) tang)
1322− (mule |.((tagged-union-fallback module u.n u.context)))
1323− ?. ?=([%& *] attempt) ~
1324− ?~ p.attempt ~
1325− ?. ?=([%& [%fork *]] u.p.attempt) ~
1326− `p.u.p.attempt
1327−::
1328−:: Keep the proven owner boundary when a nested union refers to itself.
1329−++ contains-named-ref
1330− |= [node=imported module=term name=term]
1331− ^- ?
1332− ?- node
1333− [%ref *] &(=(module module.node) =(name name.node))
1334− [%named *] |
1335− [%face *] $(node body.node)
1336− [%cell *] |($(node head.node) $(node tail.node))
1337− [%fork *] (lien cases.node |=(child=imported (contains-named-ref child module name)))
1338− [%apply *] (lien args.node |=(child=imported (contains-named-ref child module name)))
1339− * |
1340− ==
1341−::
1342++ walk
767++ walk
1343 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
768 |= [module=term typ=type sig=signatures seen=visiting context=(unit type)]
1344 ^- imported
769 ^- imported
@@ -1347,10 +772,10 @@
1347 %void [%void ~]
772 %void [%void ~]
1348 [%atom *]
773 [%atom *]
1349 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
774 ?: |(=('s' (cut 3 [0 1] p.typ)) =('r' (cut 3 [0 1] p.typ)))
1350− [%invalid %aura 'signed and float auras cannot be imported']
775+ [%bad 'signed and float auras cannot be imported']
1351 [%atom p.typ q.typ]
776 [%atom p.typ q.typ]
1352 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
777 [%cell *] [%cell $(typ p.typ) $(typ q.typ)]
1353− [%core *] [%invalid %core 'cores and gates cannot be imported']
778+ [%core *] [%bad 'cores and gates cannot be imported']
1354 [%face *]
779 [%face *]
1355 ?@ p.typ [%face p.typ $(typ q.typ)]
780 ?@ p.typ [%face p.typ $(typ q.typ)]
1356 [%bad 'a complex Hoon face needs translation']
781 [%bad 'a complex Hoon face needs translation']
@@ -1359,26 +784,14 @@
1359 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
784 (turn ~(tap in:..zuse p.typ) |=(t=type ^$(typ t)))
1360 =/ err (first-bads cases)
785 =/ err (first-bads cases)
1361 ?^ err [%bad u.err]
786 ?^ err [%bad u.err]
1362− ?. (all-disjoint cases) [%bad 'Hoon union disjointness could not be verified']
787+ ?. (all-disjoint cases) [%bad 'a Hoon union has overlapping cases']
1363 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
788 [%fork (sort cases |=(pair=[imported imported] (dor -.pair +.pair)))]
1364 [%hint *] $(typ q.typ)
789 [%hint *] $(typ q.typ)
1365 [%hold *]
790 [%hold *]
1366− =/ prior=(unit (unit term)) (find-seen typ seen)
1367− ?^ prior
1368− ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
1369− =/ origin (ref-origin module u.u.prior typ context)
1370− ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
1371− [%ref u.origin u.u.prior]
1372− =/ nested=(unit imported) (nested-tagged-union module typ context)
1373− ?^ nested
1374− ?: ?=(~ seen) u.nested
1375− =/ name=(unit term) (hold-name q.typ)
1376− ?~ name u.nested
1377− ?. (contains-named-ref u.nested module u.name) u.nested
1378− [%named module u.name u.nested]
1379− ?: &(?=([%tsls [%note * *] *] q.typ) |((has-spec-cell-union q.typ) (has-spec-general-union q.typ)))
791+ ?: &(?=([%tsls [%note * *] *] q.typ) (has-spec-cell-union q.typ))
1380− =/ nm (hold-name q.typ)
792+ [%bad 'a Hoon $^ union needs a source-level disjointness check']
1381− (collection-union typ module sig [[typ nm] seen] context)
793+ ?: &(?=([%tsls [%note * *] *] q.typ) (has-spec-general-union q.typ))
794+ [%bad 'a Hoon union needs a source-level disjointness check']
1382 =/ named=(unit term) (match-signature q.typ sig)
795 =/ named=(unit term) (match-signature q.typ sig)
1383 ?^ named
796 ?^ named
1384 =/ name u.named
797 =/ name u.named
@@ -1392,8 +805,14 @@
1392 =/ second=type (~(play ut p.typ) (ream '*value'))
805 =/ second=type (~(play ut p.typ) (ream '*value'))
1393 [%apply name ~[first-import $(typ second)]]
806 [%apply name ~[first-import $(typ second)]]
1394 [%apply name ~[first-import]]
807 [%apply name ~[first-import]]
808+ =/ prior=(unit (unit term)) (find-seen typ seen)
809+ ?^ prior
810+ ?~ u.prior [%bad 'an anonymous recursive Hoon mold cannot be named']
811+ =/ origin (ref-origin module u.u.prior typ context)
812+ ?~ origin [%bad 'a recursive Hoon mold needs unambiguous source provenance']
813+ [%ref u.origin u.u.prior]
1395 =/ nm (hold-name q.typ)
814 =/ nm (hold-name q.typ)
1396− ?: =(nm [~ %vase]) [%bad 'a Hoon type named vase needs source provenance']
815+ ?: =(nm [~ %vase]) [%bad 'vases cannot be imported']
1397 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
816 ?: &((source-uses q.typ %jar) !(alias-safe context %jar))
1398 [%bad 'Hoon collection provenance is unavailable or shadowed']
817 [%bad 'Hoon collection provenance is unavailable or shadowed']
1399 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
818 ?: &((source-uses q.typ %jug) !(alias-safe context %jug))
@@ -1402,8 +821,7 @@
1402 [%bad 'Hoon collection provenance is unavailable or shadowed']
821 [%bad 'Hoon collection provenance is unavailable or shadowed']
1403 =/ mop (mop-arguments typ)
822 =/ mop (mop-arguments typ)
1404 ?^ mop
823 ?^ mop
1405− :: An exact revisit fails closed without guessing a name.
1406− [%apply %mop ~[$(typ key.u.mop, seen [[typ ~] seen]) $(typ value.u.mop, seen [[typ ~] seen])]]
824+ [%apply %mop ~[$(typ key.u.mop) $(typ value.u.mop)]]
1407 ?: (source-uses q.typ %mop)
825 ?: (source-uses q.typ %mop)
1408 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
826 =/ checked-names=(list term) ~[%map %set %qeu %list %unit]
1409 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
827 ?: (lien checked-names |=(n=term &((source-uses q.typ n) !(alias-safe context n))))
@@ -1438,7 +856,7 @@
1438 ?^ err [%bad u.err]
856 ?^ err [%bad u.err]
1439 ?: (disjoint first second)
857 ?: (disjoint first second)
1440 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
858 [%fork (sort ~[first second] |=(pair=[imported imported] (dor -.pair +.pair)))]
1441− [%bad 'Hoon $^ union disjointness could not be verified']
859+ [%bad 'a Hoon $^ union has overlapping cases']
1442 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
860 ?: |((has-cell-union q.typ) (has-fits-union q.typ))
1443 =/ cannot=@t
861 =/ cannot=@t
1444 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
862 ?: (has-fits-union q.typ) 'a Hoon union needs a source-level disjointness check'
@@ -1495,9 +913,7 @@
1495 [%atom *] ~
913 [%atom *] ~
1496 [%ref *] ~
914 [%ref *] ~
1497 [%bad *] [~ reason.out]
915 [%bad *] [~ reason.out]
1498− [%invalid *] [~ reason.out]
1499 [%face *] $(out body.out)
916 [%face *] $(out body.out)
1500− [%named *] $(out body.out)
1501 [%cell *]
917 [%cell *]
1502 =/ err $(out head.out)
918 =/ err $(out head.out)
1503 ?~ err $(out tail.out)
919 ?~ err $(out tail.out)
@@ -1513,35 +929,6 @@
1513 =/ err (first-bad i.xs)
929 =/ err (first-bad i.xs)
1514 ?~ err $(xs t.xs)
930 ?~ err $(xs t.xs)
1515 err
931 err
1516−::
1517−++ first-invalid
1518− |= out=imported
1519− ^- (unit import-diagnostic)
1520− ?- out
1521− [%noun *] ~
1522− [%void *] ~
1523− [%atom *] ~
1524− [%ref *] ~
1525− [%bad *] `[%unsupported reason.out]
1526− [%invalid *] `[%invalid code.out reason.out]
1527− [%face *] $(out body.out)
1528− [%named *] $(out body.out)
1529− [%cell *]
1530− =/ first $(out head.out)
1531− ?~ first $(out tail.out)
1532− first
1533− [%fork *] (first-invalids cases.out)
1534− [%apply *] (first-invalids args.out)
1535− ==
1536−::
1537−++ first-invalids
1538− |= xs=(list imported)
1539− ^- (unit import-diagnostic)
1540− ?~ xs ~
1541− =/ first (first-invalid i.xs)
1542− ?~ first $(xs t.xs)
1543− first
1544−::
1545:: +fixture-test: shared golden expectations for eval and the ship.
932:: +fixture-test: shared golden expectations for eval and the ship.
1546:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
933:: A synthetic hold whose first $^ branch cannot be evaluated. It tests
1547:: that a failed branch probe is reported rather than crashing the host.
934:: that a failed branch probe is reported rather than crashing the host.
@@ -1637,7 +1024,7 @@
1637 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1024 [%fork ~[[%cell [%face %x [%atom %ud ~]] [%face %y [%atom %ud ~]]] [%atom %ud ~]]]
1638 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1025 =/ errors ?: =((sample %valid-cell) [%& expect-valid]) errors
1639 ['disjoint cell union' errors]
1026 ['disjoint cell union' errors]
1640− =/ errors ?: =((sample %invalid-cell) [%| 'Hoon $^ union disjointness could not be verified']) errors
1027+ =/ errors ?: =((sample %invalid-cell) [%| 'a Hoon $^ union has overlapping cases']) errors
1641 ['overlapping cell union is rejected' errors]
1028 ['overlapping cell union is rejected' errors]
1642 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1029 =/ errors ?: =((shad %mn) [%| 'Hoon collection provenance is unavailable or shadowed']) errors
1643 ['local mop shadow in a field is rejected' errors]
1030 ['local mop shadow in a field is rejected' errors]
@@ -1678,11 +1065,9 @@
1678 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1065 [%cell *] "[{(show-import head.out)} {(show-import tail.out)}]"
1679 [%face *] "{(trip name.out)}={(show-import body.out)}"
1066 [%face *] "{(trip name.out)}={(show-import body.out)}"
1680 [%fork *] "(union {(show-imports cases.out)})"
1067 [%fork *] "(union {(show-imports cases.out)})"
1681− [%named *] "(named {(trip name.out)}.{(trip module.out)} {(show-import body.out)})"
1682 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1068 [%apply *] "({(trip name.out)} {(show-imports args.out)})"
1683 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1069 [%ref *] "{(trip name.out)}.{(trip module.out)}"
1684 [%bad *] "error: {(trip reason.out)}"
1070 [%bad *] "error: {(trip reason.out)}"
1685− [%invalid *] "error: {(trip reason.out)}"
1686 ==
1071 ==
1687::
1072::
1688++ show-imports
1073++ show-imports
@@ -1700,15 +1085,6 @@
1700 [%| *] "error: {(trip p.result)}"
1085 [%| *] "error: {(trip p.result)}"
1701 ==
1086 ==
1702::
1087::
1703−++ show-import-diagnostic
1704− |= result=import-diagnostic
1705− ^- tape
1706− ?- result
1707− [%ok *] (show-import value.result)
1708− [%invalid *] "invalid/{(trip code.result)}: {(trip message.result)}"
1709− [%unsupported *] "unsupported: {(trip message.result)}"
1710− ==
1711−::
1712:: Clay includes debug spans around source nodes. Reproduce that
1088:: Clay includes debug spans around source nodes. Reproduce that
1713:: shape without Clay so the same regression runs under eval and -test.
1089:: shape without Clay so the same regression runs under eval and -test.
1714++ decorate-union-source
1090++ decorate-union-source
@@ -1732,80 +1108,6 @@
1732 =/ source=hoon original(q.p (decorate-union-source q.p.original))
1108 =/ source=hoon original(q.p (decorate-union-source q.p.original))
1733 (read-mold %small name typ(q source))
1109 (read-mold %small name typ(q source))
1734::
1110::
1735−:: Test debug metadata at the spec boundary without assuming that the
1736−:: eval version of Hoon's spec mold itself includes Clay's %dbug tag.
1737−++ debug-spec-fixture
1738− ^- tape
1739− =/ location=* [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1740− =/ wrapped=* [%dbug location [%leaf %tas %x]]
1741− =/ got=(unit *) (source-gist-tail wrapped)
1742− ?~ got "debug wrapper missing"
1743− =/ leaf=(each spec tang) (mule |.(;;(spec u.got)))
1744− ?. ?=([%& [%leaf %tas %x]] leaf) "debug leaf not recovered"
1745− =/ branch=spec [%bccl ~[p.leaf [%base [%atom %t]]]]
1746− ?^ (tagged-cases ~[branch branch] ~) "duplicate tags accepted"
1747− =/ broken=(unit *) (source-gist-tail [%dbug location 42])
1748− ?~ broken "debug wrapper missing"
1749− =/ invalid=(each spec tang) (mule |.(;;(spec u.broken)))
1750− ?: ?=(%& -.invalid) "malformed spec accepted"
1751− "valid wrapper; duplicate and malformed rejected"
1752−::
1753−:: The same named-operand call with Clay-style source-location wrappers.
1754−++ debug-mop-fixture
1755− |= cor=type
1756− ^- tape
1757− =/ typ=type (~(play ut cor) (ream '*mop-wing-valid'))
1758− ?> ?=([%hold *] typ)
1759− =/ original=hoon q.typ
1760− ?> ?=([%tsls [%note * *] *] original)
1761− =/ body=hoon q.p.original
1762− ?> ?=([%cncl *] body)
1763− ?> ?=([%tsgr *] p.body)
1764− =/ b=hoon q.p.body
1765− ?> ?=([%cncl *] b)
1766− =/ call=hoon p.b
1767− ?> ?=([%cncl *] call)
1768− ?> ?=([* [* ~]] q.call)
1769− =/ at=spot [/tests/importer/synthetic/hoon [[1 1] [1 2]]]
1770− =/ inner=hoon call(p [%dbug at p.call], q ~[[%dbug at i.q.call] [%dbug at i.t.q.call]])
1771− =/ outer=hoon body(p p.body(q b(p [%dbug at inner])))
1772− =/ mixed=hoon body(p p.body(q b(p inner)))
1773− =/ multi=hoon body(p p.body(q b(p call(p [%dbug at [%wing ~[%one %two]]]))))
1774− =/ plain=(unit [key=spec value=spec]) (mop-specs body)
1775− ?~ plain "unwrapped mop not recognized"
1776− ?. =((mop-specs [%dbug at outer]) plain) "wrapped mop not recognized"
1777− ?. =((mop-specs mixed) plain) "mixed mop not recognized"
1778− ?^ (mop-specs multi) "multi-segment callee accepted"
1779− ?^ (mop-specs [%dbug at [%sand %ud 42]]) "malformed call accepted"
1780− ?^ (source-single-wing [%dbug at 42]) "malformed wing accepted"
1781− ?^ (source-single-wing [%dbug at [%wing ~[%one %two]]]) "multi-segment operand accepted"
1782− =/ four=* [%dbug at [%dbug at [%dbug at [%dbug at [%wing ~[%mop]]]]]]
1783− =/ five=* [%dbug at four]
1784− ?~ (source-single-wing four) "four wrappers rejected"
1785− ?^ (source-single-wing five) "wrapper limit exceeded"
1786− ?~ (source-note-unwrap four 4) "four note wrappers rejected"
1787− ?^ (source-note-unwrap five 4) "note wrapper limit exceeded"
1788− =/ selected=(unit hoon) (local-arm-source cor %tag-valid)
1789− ?~ selected "selected union not found"
1790− =/ arm-four=hoon [%dbug at [%dbug at [%dbug at [%dbug at u.selected]]]]
1791− =/ arm-five=hoon [%dbug at arm-four]
1792− ?~ (tagged-source-code arm-four %tag-valid) "four wrapped selected arms rejected"
1793− ?^ (tagged-source-code arm-five %tag-valid) "selected arm wrapper limit exceeded"
1794− "wrapped and mixed calls accepted; malformed, multi-segment and excessive wrappers rejected"
1795−::
1796−:: Synthetic nodes test each part of the direct collection-call proof.
1797−++ collection-wrapper-fixture
1798− ^- tape
1799− =/ call=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1800− =/ subject=hoon [%cncl [%tsgr [%wing ~[[%.y 8]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 6]]]
1801− =/ sample=hoon [%cncl [%tsgr [%wing ~[[%.y 7]]] [%cncl [%wing ~[%list]] ~]] ~[[%$ 2]]]
1802− =/ good=hoon [%tsls [%note [%made %x ~] call] [%tsls [%dtts [%$ 14] [%$ 2]] [%$ 6]]]
1803− =/ tail=hoon [%tsls [%note [%made %x ~] call] [%$ 6]]
1804− =/ args=(list [hoon hoon]) ~[[call good] [subject good] [sample good] [call tail]]
1805− =/ flags=(list ?) (turn args |=(pair=[hoon hoon] (direct-collection-source -.pair +.pair)))
1806− ?: =(flags ~[& | | |]) "valid; forged subject, sample and tail rejected"
1807− "wrapper guard failed"
1808−::
1809++ overlap-fork-fixture
1111++ overlap-fork-fixture
1810 ^- type
1112 ^- type
1811 =/ nodes=(list type) ~[[%atom %ud ~] [%atom %t ~]]
1113 =/ nodes=(list type) ~[[%atom %ud ~] [%atom %t ~]]
@@ -1838,23 +1140,6 @@
1838 =/ mark-rec-core=type -:(ride fp mark-rec)
1140 =/ mark-rec-core=type -:(ride fp mark-rec)
1839 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
1141 =/ mark-gate-core=type -:(ride -:!>(..zuse) mark-gate)
1840 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1142 =/ mark-basic-core=type -:(ride -:!>(..zuse) mark-basic)
1841− =/ make-mark
1842− |= [field=@t scope=type]
1843− ^- type
1844− -:(ride scope (crip "|_ a={(trip field)}\0a++ grab |% ++ noun a --\0a++ grow |% ++ noun a --\0a++ grad %noun\0a--\0a"))
1845− =/ mark-union-core=type (make-mark 'mark-flag-valid:small' fp)
1846− =/ mark-overlap-core=type (make-mark 'mark-flag-overlap:small' fp)
1847− =/ mark-hidden-core=type (make-mark 'mark-flag-hidden:small' fp)
1848− =/ mark-signed-core=type (make-mark 'signed:small' fp)
1849− =/ mark-callable-core=type (make-mark 'gate-test:small' fp)
1850− =/ extra-subject=type [%cell [%face %other other] fp]
1851− =/ mark-extra-core=type (make-mark 'mark-flag-valid:small' extra-subject)
1852− =/ other-hold=type (~(play ut other) (ream '*chain'))
1853− =/ recursive-hold=type (~(play ut sc) (ream '*chain'))
1854− =/ fake-vase=type -:(ride -:!>(..zuse) '|%\0a+$ vase @ud\0a--\0a')
1855− =/ spoof=(unit import-diagnostic)
1856− (first-invalid [%bad 'signed and float auras cannot be imported'])
1857− ?> ?=(^ spoof)
1858 =/ mark-shadow-core=type -:(ride sp mark-basic)
1143 =/ mark-shadow-core=type -:(ride sp mark-basic)
1859 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
1144 =/ tshp=type [%cell [%face %intermediate shc] -:!>(..zuse)]
1860 =/ tshc=type -:(ride tshp only-list)
1145 =/ tshc=type -:(ride tshp only-list)
@@ -1865,30 +1150,6 @@
1865 =/ distinct=type -:(ride distinct-parent origin-first)
1150 =/ distinct=type -:(ride distinct-parent origin-first)
1866 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
1151 =/ trans-amb-parent=type [%cell [%face %intermediate fc] [%cell [%face %second sc] -:!>(..zuse)]]
1867 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1152 =/ trans-amb=type -:(ride trans-amb-parent origin-trans)
1868− =/ tag-child=@t
1869− '|%\0a+$ tag-invalid-cell @t\0a+$ choice $%([%ok a=tag-invalid-cell] [%err a=@ud])\0a--\0a'
1870− =/ tag-collision=type -:(ride [%cell [%face %base sc] -:!>(..zuse)] tag-child)
1871− =/ tag-clean=type -:(ride [%cell [%face %base other] -:!>(..zuse)] tag-child)
1872− =/ tag-zuse=@t
1873− '|%\0a+$ ship @t\0a+$ path @ud\0a+$ choice $%([%ok who=ship] [%err where=path])\0a--\0a'
1874− =/ tag-zuse-core=type -:(ride -:!>(..zuse) tag-zuse)
1875− =/ nest-parent-src=@t
1876− '|%\0a+$ tag-nest-inner $%([%foreign @t] [%foreign @t])\0a--\0a'
1877− =/ nest-parent=type -:(ride -:!>(..zuse) nest-parent-src)
1878− =/ nest-child-src=@t
1879− '|%\0a+$ tag-nest-inner $%([%left @t] [%right @ud])\0a+$ tag-nest-middle $%([%one x=tag-nest-inner] [%two ~])\0a--\0a'
1880− =/ nest-collision=type -:(ride [%cell [%face %base nest-parent] -:!>(..zuse)] nest-child-src)
1881− =/ self-parent=type
1882− -:(ride -:!>(..zuse) '|%\0a+$ tag-self ?(%same %same)\0a--\0a')
1883− =/ self-child=@t
1884− '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@t])\0a--\0a'
1885− =/ self-collision=type -:(ride [%cell [%face %tag-self self-parent] -:!>(..zuse)] self-child)
1886− =/ self-other=type
1887− -:(ride -:!>(..zuse) '|%\0a+$ tag-self $%([%branch children=(list tag-self)] [%leaf value=@ud])\0a--\0a')
1888− =/ mop-ford-parent=type
1889− -:(ride -:!>(..zuse) '|%\0a+$ value ?(%same %same)\0a--\0a')
1890− =/ mop-ford-child=type
1891− -:(ride [%cell [%face %value mop-ford-parent] -:!>(..zuse)] '|%\0a+$ key @ud\0a+$ value @t\0a+$ mm ((mop key value) lte)\0a--\0a')
1892 =/ sample
1153 =/ sample
1893 |= name=term
1154 |= name=term
1894 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
1155 (read-mold-in %small name (~(play ut sc) (ream (cat 3 '*' name))) sc)
@@ -1926,15 +1187,6 @@
1926 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
1187 (crip "nested-static-mop: {(show-result (sample %nested-static-mop))}")
1927 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
1188 (crip "collection-siblings: {(show-result (sample %collection-siblings))}")
1928 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1189 (crip "dynamic-sibling-mop: {(show-result (sample %dynamic-sibling-mop))}")
1929− (crip "mark-flag-source: {(show-result (read-named %small %mark-flag-valid sc))}")
1930− (crip "mark-flag-union: {(show-result (read-mark %flag-union mark-union-core))}")
1931− (crip "mark-flag-overlap: {(show-result (read-mark %flag-overlap mark-overlap-core))}")
1932− (crip "mark-flag-hidden: {(show-result (read-mark %flag-hidden mark-hidden-core))}")
1933− (crip "mark-flag-signed: {(show-result (read-mark %flag-signed mark-signed-core))}")
1934− (crip "mark-flag-callable: {(show-result (read-mark %flag-callable mark-callable-core))}")
1935− (crip "mark-flag-extra: {(show-result (read-mark %flag-extra mark-extra-core))}")
1936− (crip "mark-flag-other-hold: {?~((mark-union-fallback other-hold fp) "unsupported" "BAD")}")
1937− (crip "mark-flag-recursive-fallback: {?~((mark-union-fallback recursive-hold fp) "unsupported" "BAD")}")
1938 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
1190 (crip "mark-record: {(show-result (read-mark %todo-item mark-core))}")
1939 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
1191 (crip "mark-recursive: {(show-result (read-mark %recursive mark-rec-core))}")
1940 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
1192 (crip "mark-gate: {(show-result (read-mark %bad mark-gate-core))}")
@@ -1959,22 +1211,11 @@
1959 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
1211 (crip "shadow-list-mop: {(show-result (read-mold-in %shadow-static %bad (~(play ut xc) (ream '*bad')) xc))}")
1960 (crip "named-mop: {(show-result (sample %named-mop))}")
1212 (crip "named-mop: {(show-result (sample %named-mop))}")
1961 (crip "mop-list: {(show-result (sample %mop-list))}")
1213 (crip "mop-list: {(show-result (sample %mop-list))}")
1962− (crip "mop-wing-valid: {(show-result (sample %mop-wing-valid))}")
1963− (crip "mop-wing-invalid-key: {(show-result (sample %mop-wing-invalid-key))}")
1964− (crip "mop-wing-invalid-key-alias: {(show-result (sample %mop-wing-invalid-key-alias))}")
1965− (crip "mop-wing-invalid-value: {(show-result (sample %mop-wing-invalid-value))}")
1966− (crip "mop-wing-invalid-value-alias: {(show-result (sample %mop-wing-invalid-value-alias))}")
1967− (crip "mop-wing-rec-key: {(show-result (sample %mop-wing-rec-key))}")
1968− (crip "mop-wing-rec-value: {(show-result (sample %mop-wing-rec-value))}")
1969− (crip "mop-wing-shadow: {(show-result (read-named %shadow %mmw hc))}")
1970− (crip "mop-wing-ford-collision: {(show-result (read-named %child %mm mop-ford-child))}")
1971− (crip "mop-wing-debug: {(debug-mop-fixture sc)}")
1972 (crip "signed: {(show-result (sample %signed))}")
1214 (crip "signed: {(show-result (sample %signed))}")
1973 (crip "float: {(show-result (sample %float))}")
1215 (crip "float: {(show-result (sample %float))}")
1974 (crip "gate: {(show-result (sample %gate-test))}")
1216 (crip "gate: {(show-result (sample %gate-test))}")
1975 (crip "vase: {(show-result vase)}")
1217 (crip "vase: {(show-result vase)}")
1976 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1218 (crip "failed-branch: {(show-result (read-mold %external %bad bad-branch-fixture))}")
1977− (crip "debug-spec: {debug-spec-fixture}")
1978 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1219 (crip "debug-union: {(show-result (debug-union-fixture sc %action))}")
1979 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1220 (crip "debug-union-overlap: {(show-result (debug-union-fixture sc %explicit-wut-overlap))}")
1980 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
1221 (crip "debug-nested-cell: {(show-result (debug-union-fixture sc %nested-valid-cell))}")
@@ -1989,17 +1230,6 @@
1989 (crip "explicit-three: {(show-result (sample %explicit-three))}")
1230 (crip "explicit-three: {(show-result (sample %explicit-three))}")
1990 (crip "explicit-unknown: {(show-result (sample %explicit-unknown))}")
1231 (crip "explicit-unknown: {(show-result (sample %explicit-unknown))}")
1991 (crip "explicit-nested: {(show-result (sample %explicit-nested))}")
1232 (crip "explicit-nested: {(show-result (sample %explicit-nested))}")
1992− (crip "collection-union-wrapper: {collection-wrapper-fixture}")
1993− (crip "collection-union-list: {(show-result (sample %collection-union-list))}")
1994− (crip "collection-union-set: {(show-result (sample %collection-union-set))}")
1995− (crip "collection-union-map-key: {(show-result (sample %collection-union-map-key))}")
1996− (crip "collection-union-map-value: {(show-result (sample %collection-union-map-value))}")
1997− (crip "collection-union-unit: {(show-result (sample %collection-union-unit))}")
1998− (crip "collection-union-collapsed: {(show-result (sample %collection-union-collapsed))}")
1999− (crip "collection-union-multiple: {(show-result (sample %collection-union-multiple))}")
2000− (crip "collection-union-nested: {(show-result (sample %collection-union-nested))}")
2001− (crip "collection-union-dependent: {(show-result (sample %collection-union-dependent))}")
2002− (crip "collection-union-shadow: {(show-result (read-named %shadow %collection-union-shadow xc))}")
2003 (crip "explicit-list: {(show-result (sample %explicit-list))}")
1233 (crip "explicit-list: {(show-result (sample %explicit-list))}")
2004 (crip "explicit-set: {(show-result (sample %explicit-set))}")
1234 (crip "explicit-set: {(show-result (sample %explicit-set))}")
2005 (crip "explicit-faces: {(show-result (sample %explicit-faces))}")
1235 (crip "explicit-faces: {(show-result (sample %explicit-faces))}")
@@ -2058,69 +1288,9 @@
2058 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
1288 (crip "named-missing: {(show-result (read-named %small %missing sc))}")
2059 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
1289 (crip "named-invalid-core: {(show-result (read-named %small %items [%atom %ud ~]))}")
2060 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
1290 (crip "named-ford-recursive: {(show-result (read-named %ford %recursive fc))}")
2061− (crip "diagnostic-items: {(show-import-diagnostic (read-named-diagnostic %small %items sc))}")
2062− (crip "diagnostic-signed: {(show-import-diagnostic (read-named-diagnostic %small %signed sc))}")
2063− (crip "diagnostic-float: {(show-import-diagnostic (read-named-diagnostic %small %float sc))}")
2064− (crip "diagnostic-overlap: {(show-import-diagnostic (read-named-diagnostic %small %explicit-percent-overlap sc))}")
2065− (crip "diagnostic-unproved: {(show-import-diagnostic (read-named-diagnostic %small %list-nested-invalid-cell sc))}")
2066− (crip "diagnostic-mark-gate: {(show-import-diagnostic (read-mark-diagnostic %bad mark-gate-core))}")
2067− (crip "diagnostic-shadow-vase: {(show-import-diagnostic (read-named-diagnostic %fake %vase fake-vase))}")
2068− (crip "diagnostic-spoof: {(show-import-diagnostic u.spoof)}")
2069 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
1291 (crip "missing-arm: {(show-result (read-mold-in %small %missing [%atom %ud ~] sc))}")
2070 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
1292 (crip "wrong-provenance: {(show-result (read-mold-in %small %action (~(play ut sc) (ream '*items')) sc))}")
2071 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
1293 (crip "unverified-subject: {(show-result (read-mold-in %std %jar (~(play ut -:!>(..zuse)) (ream '*(jar @ud @t)')) -:!>(..zuse)))}")
2072− (crip "tag-ford-collision: {(show-result (read-named %child %choice tag-collision))}")
2073− (crip "tag-ford-clean: {(show-result (read-named %child %choice tag-clean))}")
2074− (crip "tag-zuse-local: {(show-result (read-named %child %choice tag-zuse-core))}")
2075− (crip "tag-nest-inner: {(show-result (sample %tag-nest-inner))}")
2076− (crip "tag-nest-middle: {(show-result (sample %tag-nest-middle))}")
2077− (crip "tag-nest-diamond: {(show-result (sample %tag-nest-diamond))}")
2078− (crip "tag-nest-deep: {(show-result (sample %tag-nest-deep))}")
2079− (crip "tag-nest-hidden: {(show-result (sample %tag-nest-hidden))}")
2080− (crip "tag-nest-overlap: {(show-result (sample %tag-nest-overlap))}")
2081− (crip "tag-nest-recursive: {(show-result (sample %tag-nest-recursive-outer))}")
2082− (crip "tag-nest-rec-list: {(show-result (sample %tag-nest-rec-list-outer))}")
2083− (crip "tag-nest-rec-repeat: {(show-result (sample %tag-nest-rec-repeat))}")
2084− (crip "tag-nest-rec-duplicate: {(show-result (sample %tag-nest-rec-bad-outer))}")
2085− (crip "tag-nest-rec-hidden: {(show-result (sample %tag-nest-rec-hidden-outer))}")
2086− (crip "tag-nest-rec-mutual: {(show-result (sample %tag-nest-rec-mutual-outer))}")
2087− (crip "tag-nest-rec-outer-overlap: {(show-result (sample %tag-nest-rec-outer-overlap))}")
2088− (crip "tag-nest-rec-owner: {?:(&((contains-named-ref [%ref %small %tag-self] %small %tag-self) !(contains-named-ref [%named %small %other [%ref %small %tag-self]] %small %tag-self)) "yes" "wrong")}")
2089− (crip "tag-nest-many: {(show-result (sample %tag-nest-many))}")
2090− (crip "tag-nest-shadow: {(show-result (read-named %shadow-static %tag-nest-shadow xc))}")
2091− (crip "tag-nest-wrong-hold: {?~((nested-tagged-union %small (~(play ut other) (ream '*chain')) `sc) "unsupported" "BAD")}")
2092− (crip "tag-nest-ford-collision: {(show-result (read-named %outer %tag-nest-middle nest-collision))}")
2093− (crip "tag-self: {(show-result (sample %tag-self))}")
2094− (crip "tag-self-tail: {(show-result (sample %tag-self-tail))}")
2095− (crip "tag-self-duplicate: {(show-result (sample %tag-self-duplicate))}")
2096− (crip "tag-self-hidden: {(show-result (sample %tag-self-hidden))}")
2097− (crip "tag-self-indirect: {(show-result (sample %tag-self-indirect))}")
2098− (crip "tag-mutual-a: {(show-result (sample %tag-mutual-a))}")
2099− (crip "tag-mutual-b: {(show-result (sample %tag-mutual-b))}")
2100− (crip "tag-self-pair: {(show-result (sample %tag-self-pair))}")
2101− (crip "tag-self-ford-collision: {(show-result (read-named %child %tag-self self-collision))}")
2102− (crip "tag-self-wrong-core: {(show-result (read-mold-in %other %tag-self (~(play ut sc) (ream '*tag-self')) self-other))}")
2103− (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")}")
2104− (crip "tag-null-good: {(show-result (sample %tag-null-good))}")
2105− (crip "tag-null-duplicate: {(show-result (sample %tag-null-duplicate))}")
2106− (crip "tag-null-hidden: {(show-result (sample %tag-null-hidden))}")
2107− (crip "tag-valid: {(show-result (sample %tag-valid))}")
2108− (crip "tag-duplicate: {(show-result (sample %tag-duplicate))}")
2109− (crip "tag-collapsed: {(show-result (sample %tag-collapsed))}")
2110− (crip "tag-invalid-direct: {(show-result (sample %tag-invalid-direct))}")
2111− (crip "tag-invalid-alias: {(show-result (sample %tag-invalid-alias))}")
2112− (crip "tag-invalid-list: {(show-result (sample %tag-invalid-list))}")
2113− (crip "tag-enum-good: {(show-result (sample %tag-enum-good))}")
2114− (crip "tag-enum-bad: {(show-result (sample %tag-enum-bad))}")
2115− (crip "tag-nested-good: {(show-result (sample %tag-nested-good))}")
2116− (crip "tag-shadow-jar: {(show-result (read-named %shadow-static %tag-shadow-jar xc))}")
2117− (crip "tag-shadow-jug: {(show-result (read-named %shadow-static %tag-shadow-jug xc))}")
2118− (crip "tag-fuel-small: {?:(?=(^ (safe-source-name %tag-fuel-2 sc ~ 64)) "yes" "no")}")
2119− (crip "tag-fuel-large: {?:(?=(~ (safe-source-name %tag-fuel-11 sc ~ 64)) "rejected" "wrong")}")
2120− (crip "presence-action-1: {(show-result (present %action-1))}")
2121− (crip "presence-command-1: {(show-result (present %command-1))}")
2122− (crip "presence-update-1: {(show-result (present %update-1))}")
2123− (crip "presence-response-1: {(show-result (present %response-1))}")
2124 (crip "presence-topic: {(show-result (present %topic))}")
1294 (crip "presence-topic: {(show-result (present %topic))}")
2125 (crip "presence-timing: {(show-result (present %timing))}")
1295 (crip "presence-timing: {(show-result (present %timing))}")
2126 (crip "presence-places: {(show-result (present %places))}")
1296 (crip "presence-places: {(show-result (present %places))}")
jibb-dev/lib/jibb.hoon+181−5349
@@ -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
@@ -4609,75 +4595,26 @@
4609:: their defaulting and inferred generalization are implemented.
4595:: their defaulting and inferred generalization are implemented.
4610:: Bare @ is a separate unrestricted atom type. A directional fit check
4596:: Bare @ is a separate unrestricted atom type. A directional fit check
4611:: 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
4612−:: needs a not-yet-implemented constraint remains unsupported. Named unions
4598+:: needs a not-yet-implemented constraint remains unsupported. Only
4613−:: retain origin and ordered arguments, including phantom arguments, apart
4599+:: unfaced cells are represented here.
4614−:: from their display name. Generic cases must be disjoint for all arguments.
4615−:: Unnamed union printing is informational; it is not Jibb syntax.
4616−::
4617−:: `proj` is a reserved, type-directed operation, not an ordinary gate.
4618−:: The supported fragment selects uniquely faced fields from a known record
4619−:: in source order (reordering is a doc question). It records the original
4620−:: call, source and target types, and source axes with its definition;
4621−:: A single selected field keeps its face and uses one source axis.
4622−:: Checked module interfaces retain that evidence and their source, including
4623−:: the private prelude dependency. A later lowerer must replace the call by
4624−:: an inline gate applied to the operand once; no lowering is implemented yet.
4625−:: Ordinary fits never insert a projection. Unknown or variable-origin record
4626−:: spines, nested projected fields and projections in
4627−:: recursive groups remain unsupported. Directional fits bound faced-spine
4628−:: proofs to fewer than 1,024 cells; the projection planner has a separate
4629−:: 4,096-step bound. These are inference limits, not language limits.
4630−::
4631−:: Supported API imports derive request-gate types atomically for multiple
4632−:: paths, including one typed segment or one diff fold per case. Their checked
4633−:: ordinary definitions, mark molds and supported poke constructor are also
4634−:: exported. A selected /sur mold is checked through its trusted reader result;
4635−:: unused cores and other bindings are not independently validated. APIs
4636−:: with /= imports, separate scry paths, multiple parameters or diffs, or a
4637−:: parameter together with a fold remain unsupported. The unchanged todo API
4638−:: fits this fragment, including named closed fold gates.
4639−::
4640−:: Each case's source-derived schema and canonical API identity travel in a
4641−:: dependency closure bound to the exact supplied bundle, prelude, scope and
4642−:: trusted reader results. Unknown cached entries are rebuilt. Request-bearing
4643−:: closures are limited to 256 source paths and requests. This is type
4644−:: inference only: no request lowering, runtime schema validator or proof that
4645−:: an arbitrary ask value is watchable is supplied.
4646−::
4647−:: A closed gate sample may omit one outer face from a known input slot when
4648−:: its product is identical. Distinct written names, nested value faces,
4649−:: ambiguous cell tails and raw-variable-origin fits retain their prior rules.
4650−::
4651−:: In one synthetic eval of a 48-module deep and 48-module wide request-free
4652−:: graph, baseline versus certificate inference took 21.53 s versus 23.10 s
4653−:: elapsed (21.10 s versus 22.34 s CPU), including startup. The deep cache's
4654−:: jam grew from 2,402 to 4,209 bytes (+1,807 bytes). These single-run figures
4655−:: are not production memory or performance benchmarks.
4656::
4600::
4657+$ itype
4601+$ itype
4658 $~ [%var 0]
4602 $~ [%var 0]
4659 $% [%var id=@ud]
4603 $% [%var id=@ud]
4660 [%avar id=@ud]
4604 [%avar id=@ud]
4661− [%rvar id=@ud]
4662 [%nvar id=@ud]
4605 [%nvar id=@ud]
4663− [%rnvar id=@ud]
4664 [%atom aura=@ta]
4606 [%atom aura=@ta]
4665 [%any-atom ~]
4607 [%any-atom ~]
4666 [%flag ~]
4608 [%flag ~]
4667− [%noun ~]
4668 [%tag id=@ud literal=lit constructor=?]
4609 [%tag id=@ud literal=lit constructor=?]
4669 [%const literal=lit]
4610 [%const literal=lit]
4670− [%collection name=term args=(list itype)]
4671− [%recursive module=term name=term label=(unit @t)]
4672− [%jrec at=path name=term label=(unit @t) head=term aura=@ta tail=term]
4673− [%union cases=(list itype) origin=(unit [at=path name=term]) label=(unit @t) args=(list itype)]
4611+ [%union cases=(list itype)]
4674 [%face name=term body=itype]
4612 [%face name=term body=itype]
4675 [%fn sample=itype product=itype]
4613 [%fn sample=itype product=itype]
4676 [%cell hed=itype tal=itype]
4614 [%cell hed=itype tal=itype]
4677 ==
4615 ==
4678+$ ibinding [id=@ud val=itype]
4616+$ ibinding [id=@ud val=itype]
4679+$ isub (list ibinding)
4617+$ isub (list ibinding)
4680−+$ ipending [id=@ud literal=lit]
4681::
4618::
4682++ itype-lookup
4619++ itype-lookup
4683 |= [n=@ud sub=isub]
4620 |= [n=@ud sub=isub]
@@ -4693,32 +4630,18 @@
4693 %var
4630 %var
4694 =/ found=(unit itype) (itype-lookup id.t sub)
4631 =/ found=(unit itype) (itype-lookup id.t sub)
4695 ?~ found t
4632 ?~ found t
4696− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4697 $(t u.found)
4633 $(t u.found)
4698 %avar
4634 %avar
4699 =/ found=(unit itype) (itype-lookup id.t sub)
4635 =/ found=(unit itype) (itype-lookup id.t sub)
4700 ?~ found t
4636 ?~ found t
4701− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4702− $(t u.found)
4703− %rvar
4704− =/ found=(unit itype) (itype-lookup id.t sub)
4705− ?~ found t
4706− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4707 $(t u.found)
4637 $(t u.found)
4708 %nvar
4638 %nvar
4709 =/ found=(unit itype) (itype-lookup id.t sub)
4639 =/ found=(unit itype) (itype-lookup id.t sub)
4710 ?~ found t
4640 ?~ found t
4711− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4712− $(t u.found)
4713− %rnvar
4714− =/ found=(unit itype) (itype-lookup id.t sub)
4715− ?~ found t
4716− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4717 $(t u.found)
4641 $(t u.found)
4718 %tag
4642 %tag
4719 =/ found=(unit itype) (itype-lookup id.t sub)
4643 =/ found=(unit itype) (itype-lookup id.t sub)
4720 ?~ found t
4644 ?~ found t
4721− ?: &(|(?=(%rvar -.u.found) ?=(%rnvar -.u.found)) =(id.t +.u.found)) u.found
4722 $(t u.found)
4645 $(t u.found)
4723 ==
4646 ==
4724::
4647::
@@ -4729,19 +4652,13 @@
4729 ?- -.t
4652 ?- -.t
4730 %var =(n id.t)
4653 %var =(n id.t)
4731 %avar =(n id.t)
4654 %avar =(n id.t)
4732− %rvar =(n id.t)
4733 %nvar =(n id.t)
4655 %nvar =(n id.t)
4734− %rnvar =(n id.t)
4735 %atom |
4656 %atom |
4736 %any-atom |
4657 %any-atom |
4737 %flag |
4658 %flag |
4738− %noun |
4739 %tag =(n id.t)
4659 %tag =(n id.t)
4740 %const |
4660 %const |
4741− %union |((lien cases.t |=(c=itype (itype-occurs n c sub))) (lien args.t |=(c=itype (itype-occurs n c sub))))
4661+ %union (lien cases.t |=(c=itype (itype-occurs n c sub)))
4742− %recursive |
4743− %jrec |
4744− %collection (lien args.t |=(c=itype (itype-occurs n c sub)))
4745 %face $(t body.t)
4662 %face $(t body.t)
4746 %fn |($(t sample.t) $(t product.t))
4663 %fn |($(t sample.t) $(t product.t))
4747 %cell |($(t hed.t) $(t tal.t))
4664 %cell |($(t hed.t) $(t tal.t))
@@ -4759,50 +4676,12 @@
4759 =. a (itype-walk a sub)
4676 =. a (itype-walk a sub)
4760 =. b (itype-walk b sub)
4677 =. b (itype-walk b sub)
4761 ?: =(a b) `sub
4678 ?: =(a b) `sub
4762− ?: &(?=(%jrec -.a) ?=(%jrec -.b))
4763− ?:(&(=(at.a at.b) =(name.a name.b) =(head.a head.b) =(aura.a aura.b) =(tail.a tail.b)) `sub ~)
4764− ?: &(?=(%recursive -.a) ?=(%recursive -.b))
4765− ?:(&(=(module.a module.b) =(name.a name.b)) `sub ~)
4766− ?: &(?=(%union -.a) ?=(%union -.b))
4767− ?. =(origin.a origin.b) ~
4768− ?: &(?=(~ args.a) ?=(~ args.b)) ?:(=(cases.a cases.b) `sub ~)
4769− ?~ origin.a ~
4770− (itype-unify-args args.a args.b sub)
4771− ?: &(?=(%collection -.a) ?=(%collection -.b))
4772− ?. =(name.a name.b) ~
4773− (itype-unify-args args.a args.b sub)
4774 ?: ?=(%var -.a)
4679 ?: ?=(%var -.a)
4775 ?: (itype-occurs id.a b sub) ~
4680 ?: (itype-occurs id.a b sub) ~
4776 `[[id.a b] sub]
4681 `[[id.a b] sub]
4777 ?: ?=(%var -.b)
4682 ?: ?=(%var -.b)
4778 ?: (itype-occurs id.b a sub) ~
4683 ?: (itype-occurs id.b a sub) ~
4779 `[[id.b a] sub]
4684 `[[id.b a] sub]
4780− :: Arithmetic's aura variable excludes loobeans; decimal literals
4781− :: remain defaultable until a later constraint makes them concrete.
4782− ?: &(?=(%nvar -.a) ?=(%rvar -.b))
4783− `[[id.b [%rnvar id.a]] [id.a [%rnvar id.a]] sub]
4784− ?: &(?=(%rvar -.a) ?=(%nvar -.b))
4785− `[[id.a [%rnvar id.b]] [id.b [%rnvar id.b]] sub]
4786− ?: &(?=(%rnvar -.a) ?=(%rvar -.b)) `[[id.b a] sub]
4787− ?: &(?=(%rvar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4788− ?: &(?=(%rnvar -.a) ?=(%nvar -.b)) `[[id.b a] sub]
4789− ?: &(?=(%nvar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4790− ?: &(?=(%rnvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4791− ?: &(?=(%avar -.a) ?=(%rnvar -.b)) `[[id.a b] sub]
4792− ?: ?=(%rnvar -.a)
4793− ?. |(?=(%rnvar -.b) ?=(%atom -.b)) ~
4794− `[[id.a b] sub]
4795− ?: ?=(%rnvar -.b)
4796− ?. ?=(%atom -.a) ~
4797− `[[id.b a] sub]
4798− ?: &(?=(%avar -.a) ?=(%rvar -.b)) `[[id.a b] sub]
4799− ?: &(?=(%rvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4800− ?: ?=(%rvar -.a)
4801− ?. |(?=(%rvar -.b) ?=(%atom -.b)) ~
4802− `[[id.a b] sub]
4803− ?: ?=(%rvar -.b)
4804− ?. ?=(%atom -.a) ~
4805− `[[id.b a] sub]
4806 :: The narrower decimal constraint survives a match with an atom
4685 :: The narrower decimal constraint survives a match with an atom
4807 :: variable; decimal syntax alone does not make it a loobean.
4686 :: variable; decimal syntax alone does not make it a loobean.
4808 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
4687 ?: &(?=(%nvar -.a) ?=(%avar -.b)) `[[id.b a] sub]
@@ -4835,15 +4714,6 @@
4835 $(a tal.a, b tal.b, sub u.first)
4714 $(a tal.a, b tal.b, sub u.first)
4836 ~
4715 ~
4837::
4716::
4838−++ itype-unify-args
4839− |= [as=(list itype) bs=(list itype) sub=isub]
4840− ^- (unit isub)
4841− ?~ as ?~(bs `sub ~)
4842− ?~ bs ~
4843− =/ next=(unit isub) (itype-unify i.as i.bs sub)
4844− ?~ next ~
4845− $(as t.as, bs t.bs, sub u.next)
4846−::
4847:: +itype-fit: one-way widening from an actual type to an expected type
4717:: +itype-fit: one-way widening from an actual type to an expected type
4848::
4718::
4849:: An unknown variable used where @ is expected gains a fresh atom
4719:: An unknown variable used where @ is expected gains a fresh atom
@@ -4857,19 +4727,13 @@
4857 ?- -.t
4727 ?- -.t
4858 %var |
4728 %var |
4859 %avar |
4729 %avar |
4860− %rvar |
4861 %nvar |
4730 %nvar |
4862− %rnvar |
4863 %atom |
4731 %atom |
4864 %any-atom &
4732 %any-atom &
4865 %flag |
4733 %flag |
4866− %noun |
4867 %tag |
4734 %tag |
4868 %const |
4735 %const |
4869− %union |((lien cases.t |=(c=itype (itype-has-any-atom c sub))) (lien args.t |=(c=itype (itype-has-any-atom c sub))))
4736+ %union (lien cases.t |=(c=itype (itype-has-any-atom c sub)))
4870− %recursive |
4871− %jrec |
4872− %collection (lien args.t |=(c=itype (itype-has-any-atom c sub)))
4873 %face $(t body.t)
4737 %face $(t body.t)
4874 %fn |($(t sample.t) $(t product.t))
4738 %fn |($(t sample.t) $(t product.t))
4875 %cell |($(t hed.t) $(t tal.t))
4739 %cell |($(t hed.t) $(t tal.t))
@@ -4893,14 +4757,6 @@
4893:: Related auras in a structural unification need a common-type rule;
4757:: Related auras in a structural unification need a common-type rule;
4894:: until that rule is implemented, report an unknown rather than error.
4758:: until that rule is implemented, report an unknown rather than error.
4895::
4759::
4896−++ itype-family-related-collection-args
4897− |= [as=(list itype) bs=(list itype) sub=isub]
4898− ^- ?
4899− ?~ as |
4900− ?~ bs |
4901− ?: (itype-family-related i.as i.bs sub) &
4902− $(as t.as, bs t.bs)
4903−::
4904++ itype-family-related
4760++ itype-family-related
4905 |= [a=itype b=itype sub=isub]
4761 |= [a=itype b=itype sub=isub]
4906 ^- ?
4762 ^- ?
@@ -4909,9 +4765,6 @@
4909 ?: &(?=(%atom -.a) ?=(%atom -.b))
4765 ?: &(?=(%atom -.a) ?=(%atom -.b))
4910 ?. !=(aura.a aura.b) |
4766 ?. !=(aura.a aura.b) |
4911 |((aura-prefix aura.a aura.b) (aura-prefix aura.b aura.a))
4767 |((aura-prefix aura.a aura.b) (aura-prefix aura.b aura.a))
4912− ?: &(?=(%collection -.a) ?=(%collection -.b))
4913− ?. =(name.a name.b) |
4914− (itype-family-related-collection-args args.a args.b sub)
4915 ?: &(?=(%face -.a) ?=(%face -.b))
4768 ?: &(?=(%face -.a) ?=(%face -.b))
4916 ?. =(name.a name.b) |
4769 ?. =(name.a name.b) |
4917 $(a body.a, b body.b)
4770 $(a body.a, b body.b)
@@ -4931,19 +4784,13 @@
4931 ?- -.typ
4784 ?- -.typ
4932 %var |
4785 %var |
4933 %avar |
4786 %avar |
4934− %rvar |
4935 %nvar |
4787 %nvar |
4936− %rnvar |
4937 %atom &
4788 %atom &
4938 %any-atom &
4789 %any-atom &
4939 %flag &
4790 %flag &
4940− %noun |
4941 %tag &
4791 %tag &
4942 %const &
4792 %const &
4943− %union |((lien cases.typ |=(c=itype (itype-has-fixed-atom c))) (lien args.typ |=(c=itype (itype-has-fixed-atom c))))
4793+ %union (lien cases.typ |=(c=itype (itype-has-fixed-atom c)))
4944− %recursive |
4945− %jrec |
4946− %collection (lien args.typ |=(c=itype (itype-has-fixed-atom c)))
4947 %face $(typ body.typ)
4794 %face $(typ body.typ)
4948 %fn |($(typ sample.typ) $(typ product.typ))
4795 %fn |($(typ sample.typ) $(typ product.typ))
4949 %cell |($(typ hed.typ) $(typ tal.typ))
4796 %cell |($(typ hed.typ) $(typ tal.typ))
@@ -4971,68 +4818,20 @@
4971 ^- ?
4818 ^- ?
4972 =. t (itype-walk t sub)
4819 =. t (itype-walk t sub)
4973 ?- -.t
4820 ?- -.t
4974− %collection (lien args.t |=(c=itype (itype-has-face c sub)))
4975 %face &
4821 %face &
4976 %cell |($(t hed.t) $(t tal.t))
4822 %cell |($(t hed.t) $(t tal.t))
4977 %fn |($(t sample.t) $(t product.t))
4823 %fn |($(t sample.t) $(t product.t))
4978 * |
4824 * |
4979 ==
4825 ==
4980::
4826::
4981−:: Closed function samples may omit a slot face, but a known name must
4982−:: match another known name. Keep nested value faces and require exact
4983−:: invariant compatibility; a faced tail against a cell is ambiguous.
4984−++ itype-closed-slot-match
4985− |= [a=itype b=itype]
4986− ^- ?
4987− ?: &(?=(%face -.a) ?=(%face -.b))
4988− ?. =(name.a name.b) |
4989− ?=(^ (itype-unify body.a body.b ~))
4990− ?: ?=(%face -.a) ?=(^ (itype-unify body.a b ~))
4991− ?: ?=(%face -.b) ?=(^ (itype-unify a body.b ~))
4992− ?=(^ (itype-unify a b ~))
4993−++ itype-closed-sample-match
4994− |= [a=itype b=itype fuel=@ud]
4995− ^- ?
4996− ?: =(0 fuel) |
4997− ?. &(?=(%cell -.a) ?=(%cell -.b)) |
4998− ?. (itype-closed-slot-match hed.a hed.b) |
4999− =/ x=itype tal.a
5000− =/ y=itype tal.b
5001− ?: &(?=(%cell -.x) ?=(%cell -.y))
5002− ?=(^ (itype-unify x y ~))
5003− ?: |(&(?=(%face -.x) ?=(%cell -.y)) &(?=(%cell -.x) ?=(%face -.y))) |
5004− (itype-closed-slot-match x y)
5005−++ itype-closed-gates-match
5006− |= [a=itype b=itype]
5007− ^- ?
5008− ?. &(?=(%fn -.a) ?=(%fn -.b)) |
5009− ?. &(?=(%cell -.sample.a) ?=(%cell -.sample.b)) |
5010− ?. =(product.a product.b) |
5011− ?^ (itype-vars a) |
5012− ?^ (itype-vars b) |
5013− ?: |((itype-has-tag a) (itype-has-tag b)) |
5014− ?. (itype-closed-sample-match sample.a sample.b 1.024) |
5015− ?=(^ (itype-unify product.a product.b ~))
5016−::
5017−++ itype-face-asym-collection-args
5018− |= [as=(list itype) bs=(list itype) sub=isub]
5019− ^- ?
5020− ?~ as |
5021− ?~ bs |
5022− ?: (itype-face-asym i.as i.bs sub) &
5023− $(as t.as, bs t.bs)
5024−::
5025++ itype-face-asym
4827++ itype-face-asym
5026 |= [a=itype b=itype sub=isub]
4828 |= [a=itype b=itype sub=isub]
5027 ^- ?
4829 ^- ?
5028 =. a (itype-walk a sub)
4830 =. a (itype-walk a sub)
5029 =. b (itype-walk b sub)
4831 =. b (itype-walk b sub)
5030− ?: &(?=(%collection -.a) ?=(%collection -.b))
5031− ?. =(name.a name.b) |
5032− (itype-face-asym-collection-args args.a args.b sub)
5033 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
4832 ?: &(?=(%face -.a) ?=(%face -.b)) $(a body.a, b body.b)
5034− ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%rvar -.b) |(?=(%nvar -.b) ?=(%rnvar -.b)))
4833+ ?: ?=(%face -.a) !|(?=(%var -.b) ?=(%avar -.b) ?=(%nvar -.b))
5035− ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%rvar -.a) |(?=(%nvar -.a) ?=(%rnvar -.a)))
4834+ ?: ?=(%face -.b) !|(?=(%var -.a) ?=(%avar -.a) ?=(%nvar -.a))
5036 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
4835 ?: &(?=(%cell -.a) ?=(%cell -.b)) |($(a hed.a, b hed.b) $(a tal.a, b tal.b))
5037 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
4836 ?: &(?=(%fn -.a) ?=(%fn -.b)) |($(a sample.a, b sample.b) $(a product.a, b product.b))
5038 |
4837 |
@@ -5055,30 +4854,6 @@
5055 [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
4854 [%cell $(actual hed.actual, expected hed.expected) $(actual tal.actual, expected tal.expected)]
5056 expected
4855 expected
5057::
4856::
5058−:: Positional call arguments do not write the sample's enclosing field
5059−:: labels. Ignore one raw sample-slot face per written argument while
5060−:: checking value faces as usual. An unknown or variable-bound cell spine
5061−:: cannot justify this distinction, so keep the existing conservative guard.
5062−++ itype-positional-slot-face-asym
5063− |= [actual=itype expected=itype sub=isub]
5064− ^- ?
5065− ?: &(?=(%fn -.actual) ?=(%fn -.expected) (itype-closed-gates-match actual expected)) |
5066− (itype-face-asym actual expected sub)
5067−::
5068−++ itype-positional-face-asym
5069− |= [args=(list expr) actual=itype expected=itype sub=isub]
5070− ^- ?
5071− ?~ args &
5072− ?~ t.args
5073− =/ slot=itype expected
5074− =? slot ?=(%face -.slot) body.slot
5075− (itype-positional-slot-face-asym actual slot sub)
5076− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) &
5077− =/ slot=itype hed.expected
5078− =? slot ?=(%face -.slot) body.slot
5079− ?: (itype-positional-slot-face-asym hed.actual slot sub) &
5080− $(args t.args, actual tal.actual, expected tal.expected)
5081−::
5082++ itype-output-may-be-cell
4857++ itype-output-may-be-cell
5083 |= [t=itype sub=isub]
4858 |= [t=itype sub=isub]
5084 ^- ?
4859 ^- ?
@@ -5087,27 +4862,16 @@
5087 %var &
4862 %var &
5088 %cell &
4863 %cell &
5089 %union &
4864 %union &
5090− %recursive &
5091− %jrec &
5092− %noun &
5093− %collection &
5094 %face $(t body.t)
4865 %face $(t body.t)
5095 %fn |($(t sample.t) $(t product.t))
4866 %fn |($(t sample.t) $(t product.t))
5096 * |
4867 * |
5097 ==
4868 ==
5098::
4869::
5099++ pending-tags
4870++ pending-tags
5100− |= [tags=(list ipending) sub=isub]
4871+ |= [tags=(list @ud) sub=isub]
5101 ^- ?
4872 ^- ?
5102 ?~ tags |
4873 ?~ tags |
5103− ?~ (itype-lookup id.i.tags sub) &
4874+ ?~ (itype-lookup i.tags sub) &
5104− $(tags t.tags)
5105−::
5106−++ pending-null
5107− |= [tags=(list ipending) sub=isub]
5108− ^- ?
5109− ?~ tags |
5110− ?: &(?=(%null form.literal.i.tags) ?=(~ (itype-lookup id.i.tags sub))) &
5111 $(tags t.tags)
4875 $(tags t.tags)
5112::
4876::
5113:: Tags remain constrained until a mold selects a case or permitted atom
4877:: Tags remain constrained until a mold selects a case or permitted atom
@@ -5118,11 +4882,10 @@
5118 ^- ?
4882 ^- ?
5119 ?- -.t
4883 ?- -.t
5120 %tag &
4884 %tag &
5121− %collection (lien args.t |=(c=itype (itype-has-tag c)))
5122 %face $(t body.t)
4885 %face $(t body.t)
5123 %fn |($(t sample.t) $(t product.t))
4886 %fn |($(t sample.t) $(t product.t))
5124 %cell |($(t hed.t) $(t tal.t))
4887 %cell |($(t hed.t) $(t tal.t))
5125− %union |((lien cases.t |=(c=itype (itype-has-tag c))) (lien args.t |=(c=itype (itype-has-tag c))))
4888+ %union (lien cases.t |=(c=itype (itype-has-tag c)))
5126 * |
4889 * |
5127 ==
4890 ==
5128::
4891::
@@ -5131,59 +4894,12 @@
5131 ^- ?
4894 ^- ?
5132 ?- -.t
4895 ?- -.t
5133 %union &
4896 %union &
5134− %collection (lien args.t |=(c=itype (itype-has-union c)))
5135 %face $(t body.t)
4897 %face $(t body.t)
5136 %fn |($(t sample.t) $(t product.t))
4898 %fn |($(t sample.t) $(t product.t))
5137 %cell |($(t hed.t) $(t tal.t))
4899 %cell |($(t hed.t) $(t tal.t))
5138 * |
4900 * |
5139 ==
4901 ==
5140::
4902::
5141−:: Until a visible generic alias can be selected, expanding a named
5142−:: generic union would hide phantom arguments and its origin. This is a
5143−:: limitation of partial inference, not the unnamed-union print notation.
5144−::
5145−++ itype-has-hidden-generic
5146− |= t=itype
5147− ^- ?
5148− ?- -.t
5149− %union
5150− ?: &(?=(~ label.t) ?=(^ args.t)) &
5151− (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-generic c)))
5152− %collection (lien args.t |=(c=itype (itype-has-hidden-generic c)))
5153− %face $(t body.t)
5154− %fn |($(t sample.t) $(t product.t))
5155− %cell |($(t hed.t) $(t tal.t))
5156− * |
5157− ==
5158−::
5159−++ itype-has-recursive
5160− |= t=itype
5161− ^- ?
5162− ?- -.t
5163− %recursive &
5164− %jrec &
5165− %collection (lien args.t |=(c=itype (itype-has-recursive c)))
5166− %union (lien (weld args.t cases.t) |=(c=itype (itype-has-recursive c)))
5167− %face $(t body.t)
5168− %cell |($(t hed.t) $(t tal.t))
5169− %fn |($(t sample.t) $(t product.t))
5170− * |
5171− ==
5172−::
5173−++ itype-has-hidden-recursive
5174− |= t=itype
5175− ^- ?
5176− ?- -.t
5177− %recursive ?=(~ label.t)
5178− %jrec ?=(~ label.t)
5179− %collection (lien args.t |=(c=itype (itype-has-hidden-recursive c)))
5180− %union (lien (weld args.t cases.t) |=(c=itype (itype-has-hidden-recursive c)))
5181− %face $(t body.t)
5182− %cell |($(t hed.t) $(t tal.t))
5183− %fn |($(t sample.t) $(t product.t))
5184− * |
5185− ==
5186−::
5187++ itype-fit-cases
4903++ itype-fit-cases
5188 |= [actual=itype cases=(list itype) sub=isub next=@ud]
4904 |= [actual=itype cases=(list itype) sub=isub next=@ud]
5189 ^- ifit
4905 ^- ifit
@@ -5203,117 +4919,36 @@
5203 $(cases t.cases, good `trial)
4919 $(cases t.cases, good `trial)
5204 ==
4920 ==
5205::
4921::
5206−:: A constructor needs a case whose head has the same literal noun as its
4922+:: A constructor needs a case with its tag at the head and a payload
5207−:: tag. An unresolved or opaque case may reveal one later, so it cannot
4923+:: compatible with the expected gate sample. Other case forms do not
5208−:: prove a mismatch or a unique match. A broad atom mold is not a case.
4924+:: identify a constructor.
5209::
4925::
5210++ itype-fit-ctor-cases
4926++ itype-fit-ctor-cases
5211 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
4927 |= [tag=lit sample=itype cases=(list itype) sub=isub next=@ud]
5212 ^- ifit
4928 ^- ifit
5213 =/ found=(unit ifit) ~
4929 =/ found=(unit ifit) ~
5214− =/ pending=? |
5215 |-
4930 |-
5216− ?~ cases
5217− ?: pending [%unknown ~]
5218− ?~ found [%bad ~]
4931+ ?~ cases ?~(found [%bad ~] u.found)
5219− u.found
5220− =/ raw=itype i.cases
5221− ?: ?=(%var -.raw)
5222− $(cases t.cases, pending &)
5223− =/ c=itype (itype-walk raw sub)
4932+ =/ c=itype (itype-walk i.cases sub)
5224− ?: ?=(?(%var %tag %recursive %jrec %union %face) -.c)
5225− $(cases t.cases, pending &)
5226 ?. ?=(%cell -.c) $(cases t.cases)
4933 ?. ?=(%cell -.c) $(cases t.cases)
5227− =/ raw-head=itype hed.c
4934+ =/ head=itype (itype-walk hed.c sub)
5228− ?: ?=(%var -.raw-head)
5229− $(cases t.cases, pending &)
5230− =/ head=itype (itype-walk raw-head sub)
5231− :: A single faced, explicitly atom-only head cannot be the tag case.
5232− :: Do not follow variables or peel nested faces for this negative proof.
5233− ?: ?=(%face -.head)
5234− ?: ?=(?(%atom %any-atom %flag %avar %rvar %nvar %rnvar) -.body.head)
5235− $(cases t.cases)
5236− $(cases t.cases, pending &)
5237− ?: ?=(?(%var %tag %recursive %jrec %union) -.head)
5238− $(cases t.cases, pending &)
5239 ?. ?=(%const -.head) $(cases t.cases)
4935 ?. ?=(%const -.head) $(cases t.cases)
5240 ?. =(val.literal.head val.tag) $(cases t.cases)
4936 ?. =(val.literal.head val.tag) $(cases t.cases)
5241− :: Equal heads can have disjoint payloads. Test each from the original
4937+ ?^ found [%unknown ~]
5242− :: substitution; a unique success is usable only with no unknown rival.
5243 =/ trial=ifit (itype-fit sample tal.c sub next)
4938 =/ trial=ifit (itype-fit sample tal.c sub next)
5244− ?- -.trial
5245− %bad $(cases t.cases)
5246− %unknown $(cases t.cases, pending &)
5247− %ok
5248− ?^ found [%unknown ~]
5249− $(cases t.cases, found `trial)
4939+ $(cases t.cases, found `trial)
5250− ==
5251::
4940::
5252++ itype-fit
4941++ itype-fit
5253 |= [actual=itype expected=itype sub=isub next=@ud]
4942 |= [actual=itype expected=itype sub=isub next=@ud]
5254 ^- ifit
4943 ^- ifit
5255− (itype-fit-inner actual expected sub next | |)
5256−++ itype-fit-inner
5257− |= [actual=itype expected=itype sub=isub next=@ud skip-width=? spine-proof=?]
5258− ^- ifit
5259− ?: &(!skip-width ?=(%cell -.actual) ?=(%cell -.expected) |((width-spine-exhausted actual 1.024) (width-spine-exhausted expected 1.024)))
5260− [%unknown ~]
5261− =/ known=(unit [source=iwfields target=iwfields])
5262− ?: skip-width ~
5263− (width-known-shape actual expected sub)
5264− =/ too-wide=? ?~(known | (gth (lent order.source.u.known) (lent order.target.u.known)))
5265− ?: too-wide [%unknown ~]
5266− =/ spine-checked=? |(spine-proof ?=(^ known))
5267 =/ uncertain=?
4944 =/ uncertain=?
5268− |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)))
4945+ |(?=(%var -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%var -.expected) ?=(%avar -.expected) ?=(%nvar -.expected))
5269− =/ actual-open=?
5270− |(?=(%var -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))
5271 =. actual (itype-walk actual sub)
4946 =. actual (itype-walk actual sub)
5272 =. expected (itype-walk expected sub)
4947 =. expected (itype-walk expected sub)
5273 ?: =(actual expected) [%ok sub next]
4948 ?: =(actual expected) [%ok sub next]
5274− :: The relation of the source loobean mold to explicit @f is not yet
5275− :: established. Keep it unsupported rather than asserting a mismatch.
5276− ?: &(?=(%flag -.actual) ?=(%atom -.expected) =(%f aura.expected)) [%unknown ~]
5277− :: Any value can be used where a noun is expected. An unresolved
5278− :: bare tag is fixed as a constant; a constructor still needs a gate.
5279− ?: ?=(%noun -.expected)
5280− ?: ?=(%tag -.actual)
5281− ?: constructor.actual [%unknown ~]
5282− [%ok [[id.actual expected] sub] next]
5283− [%ok sub next]
5284− :: An arbitrary noun is not known to fit a narrower type.
5285− ?: &(?=(%noun -.actual) !?=(%var -.expected)) [%unknown ~]
5286− ?: &(!uncertain ?=(%jrec -.actual) ?=(%face -.expected)) $(expected body.expected)
5287− ?: &(!uncertain ?=(%face -.actual) ?=(%jrec -.expected)) $(actual body.actual)
5288− ?: &(?=(%jrec -.actual) ?=(%jrec -.expected))
5289− ?:(&(=(at.actual at.expected) =(name.actual name.expected) =(head.actual head.expected) =(aura.actual aura.expected) =(tail.actual tail.expected)) [%ok sub next] [%bad ~])
5290− ?: &(|(?=(%jrec -.actual) ?=(%jrec -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5291− ?: &(?=(%recursive -.actual) ?=(%recursive -.expected))
5292− ?:(&(=(module.actual module.expected) =(name.actual name.expected)) [%ok sub next] [%bad ~])
5293− ?: &(|(?=(%recursive -.actual) ?=(%recursive -.expected)) !|(?=(%var -.actual) ?=(%var -.expected))) [%unknown ~]
5294− ?: &(?=(%union -.actual) ?=(%union -.expected))
4949+ ?: &(?=(%union -.actual) ?=(%union -.expected)) [%unknown ~]
5295− ?. =(origin.actual origin.expected) [%unknown ~]
5296− ?: &(?=(~ args.actual) ?=(~ args.expected))
5297− ?:(=(cases.actual cases.expected) [%ok sub next] [%unknown ~])
5298− ?~ origin.actual [%unknown ~]
5299− =/ unified=(unit isub) (itype-unify-args args.actual args.expected sub)
5300− ?^ unified [%ok u.unified next]
5301− [%unknown ~]
5302− :: A known union can instantiate an unconstrained sample directly;
5303− :: preserve unknown results for variable-bound union origins.
5304− ?: &(!actual-open ?=(%union -.actual) ?=(%var -.expected))
5305− ?~ origin.actual [%unknown ~]
5306− =/ normalized=itype (itype-normalize actual sub)
5307− ?: |((itype-has-tag normalized) (itype-has-recursive normalized) (itype-has-any-atom actual sub)) [%unknown ~]
5308− =/ unified=(unit isub) (itype-unify actual expected sub)
5309− ?~ unified [%unknown ~]
5310− [%ok u.unified next]
5311− :: A concrete union value in a tuple may acquire the expected field's
5312− :: face. A variable-bound union still needs face propagation support.
5313− ?: &(!uncertain ?=(%union -.actual) ?=(%face -.expected))
5314− $(expected body.expected)
5315 ?: ?=(%union -.actual) [%unknown ~]
4950 ?: ?=(%union -.actual) [%unknown ~]
5316− ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)))) [%unknown ~]
4951+ ?: &(?=(%union -.expected) |(?=(%avar -.actual) ?=(%nvar -.actual))) [%unknown ~]
5317 ?: &(?=(%union -.expected) !?=(%var -.actual))
4952 ?: &(?=(%union -.expected) !?=(%var -.actual))
5318 (itype-fit-cases actual cases.expected sub next)
4953 (itype-fit-cases actual cases.expected sub next)
5319 ?: ?=(%tag -.actual)
4954 ?: ?=(%tag -.actual)
@@ -5321,7 +4956,7 @@
5321 =/ u=(unit isub) (itype-unify actual expected sub)
4956 =/ u=(unit isub) (itype-unify actual expected sub)
5322 ?~ u [%bad ~]
4957 ?~ u [%bad ~]
5323 [%ok u.u next]
4958 [%ok u.u next]
5324− ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
4959+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5325 ?: ?=(%face -.expected) $(expected body.expected)
4960 ?: ?=(%face -.expected) $(expected body.expected)
5326 ?: constructor.actual
4961 ?: constructor.actual
5327 ?. ?=(%fn -.expected) [%bad ~]
4962 ?. ?=(%fn -.expected) [%bad ~]
@@ -5330,10 +4965,6 @@
5330 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
4965 =/ trial=ifit (itype-fit-ctor-cases literal.actual sample.expected cases sub next)
5331 ?. ?=(%ok -.trial) trial
4966 ?. ?=(%ok -.trial) trial
5332 [%ok [[id.actual expected] sub.trial] next.trial]
4967 [%ok [[id.actual expected] sub.trial] next.trial]
5333− :: Zero may be the empty list. A nested cell fit lacks the context
5334− :: needed to resolve it here, so do not report a definite mismatch.
5335− ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5336− [%unknown ~]
5337 ?: ?=(%const -.expected)
4968 ?: ?=(%const -.expected)
5338 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
4969 ?:(=(val.literal.actual val.literal.expected) [%ok [[id.actual expected] sub] next] [%bad ~])
5339 ?: ?=(%atom -.expected)
4970 ?: ?=(%atom -.expected)
@@ -5349,17 +4980,11 @@
5349 =/ u=(unit isub) (itype-unify actual expected sub)
4980 =/ u=(unit isub) (itype-unify actual expected sub)
5350 ?~ u [%bad ~]
4981 ?~ u [%bad ~]
5351 [%ok u.u next]
4982 [%ok u.u next]
5352− ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
4983+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5353 ?: ?=(%face -.expected) $(expected body.expected)
4984 ?: ?=(%face -.expected) $(expected body.expected)
5354− ?: &(?=(%collection -.expected) =(%list name.expected) =(0 val.literal.actual))
5355− [%unknown ~]
5356 ?: ?=(%const -.expected)
4985 ?: ?=(%const -.expected)
5357 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
4986 ?:(=(val.literal.actual val.literal.expected) [%ok sub next] [%bad ~])
5358 ?: ?=(%atom -.expected)
4987 ?: ?=(%atom -.expected)
5359− :: A loobean singleton must not silently widen into another aura.
5360− ?: =(%loobean form.literal.actual)
5361− ?: =(%f aura.expected) [%unknown ~]
5362− [%bad ~]
5363 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
4988 ?: |(=(%tas aura.expected) =(%ta aura.expected)) [%ok sub next]
5364 [%bad ~]
4989 [%bad ~]
5365 ?: ?=(%flag -.expected)
4990 ?: ?=(%flag -.expected)
@@ -5367,14 +4992,8 @@
5367 ?: ?=(%any-atom -.expected) [%ok sub next]
4992 ?: ?=(%any-atom -.expected) [%ok sub next]
5368 [%bad ~]
4993 [%bad ~]
5369 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
4994 ?: &(uncertain (itype-face-asym actual expected sub)) [%unknown ~]
5370− :: A known face labels the same noun. Peel it before applying the
5371− :: directional unrestricted-atom rule, preserving raw-variable guards.
5372− ?: &(!uncertain ?=(%any-atom -.actual) ?=(%face -.expected))
5373− $(expected body.expected, skip-width |, spine-proof |)
5374− ?: &(!uncertain ?=(%any-atom -.expected) ?=(%face -.actual))
5375− $(actual body.actual, skip-width |, spine-proof |)
5376 ?: ?=(%any-atom -.expected)
4995 ?: ?=(%any-atom -.expected)
5377− ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%rvar -.actual) |(?=(%nvar -.actual) ?=(%rnvar -.actual)) ?=(%flag -.actual)) [%ok sub next]
4996+ ?: |(?=(%atom -.actual) ?=(%avar -.actual) ?=(%nvar -.actual) ?=(%flag -.actual)) [%ok sub next]
5378 ?: ?=(%var -.actual)
4997 ?: ?=(%var -.actual)
5379 =/ unified=(unit isub) (itype-unify actual [%avar next] sub)
4998 =/ unified=(unit isub) (itype-unify actual [%avar next] sub)
5380 ?~ unified [%bad ~]
4999 ?~ unified [%bad ~]
@@ -5385,48 +5004,34 @@
5385 =/ unified=(unit isub) (itype-unify actual expected sub)
5004 =/ unified=(unit isub) (itype-unify actual expected sub)
5386 ?~ unified [%bad ~]
5005 ?~ unified [%bad ~]
5387 [%ok u.unified next]
5006 [%ok u.unified next]
5388− ?: |(?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected))) [%unknown ~]
5007+ ?: |(?=(%avar -.expected) ?=(%nvar -.expected)) [%unknown ~]
5389 [%bad ~]
5008 [%bad ~]
5390 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5009 ?: &(?=(%atom -.actual) ?=(%atom -.expected))
5391 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5010 ?: (aura-prefix aura.expected aura.actual) [%ok sub next]
5392 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5011 ?: &((aura-prefix aura.actual aura.expected) uncertain) [%unknown ~]
5393 [%bad ~]
5012 [%bad ~]
5394 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5013 ?: &(?=(%cell -.actual) ?=(%cell -.expected))
5395− =/ first=ifit $(actual hed.actual, expected hed.expected, skip-width |, spine-proof |)
5014+ =/ first=ifit $(actual hed.actual, expected hed.expected)
5396 ?. ?=(%ok -.first) first
5015 ?. ?=(%ok -.first) first
5397− $(actual tal.actual, expected tal.expected, sub sub.first, next next.first, skip-width spine-checked, spine-proof spine-checked)
5016+ $(actual tal.actual, expected tal.expected, sub sub.first, next next.first)
5398− :: A field may add a face to an occurrence of the very same type
5399− :: variable. Binding that variable to a face around itself would fail
5400− :: the occurs check, but its underlying type has already matched.
5401− ?: &(?=(%var -.actual) ?=(%face -.expected) =(actual (itype-walk body.expected sub)))
5402− [%ok sub next]
5403− :: Differing variables and faces need propagation that is not yet
5404− :: represented. Binding one to the face can create a false mismatch.
5405− ?: &(?=(%var -.actual) ?=(%face -.expected)) [%unknown ~]
5406− ?: &(?=(%face -.actual) ?=(%var -.expected)) [%unknown ~]
5407 ?: &(?=(%var -.actual) (itype-has-any-atom expected sub))
5017 ?: &(?=(%var -.actual) (itype-has-any-atom expected sub))
5408 [%unknown ~]
5018 [%unknown ~]
5409 ?: |(?=(%var -.actual) ?=(%var -.expected))
5019 ?: |(?=(%var -.actual) ?=(%var -.expected))
5410 =/ unified=(unit isub) (itype-unify actual expected sub)
5020 =/ unified=(unit isub) (itype-unify actual expected sub)
5411 ?~ unified
5021 ?~ unified
5412− ?: |(?=(%face -.actual) ?=(%face -.expected)) [%unknown ~]
5413− ?: |((itype-has-recursive (itype-normalize actual sub)) (itype-has-recursive (itype-normalize expected sub))) [%unknown ~]
5414 ?: (itype-family-related actual expected sub) [%unknown ~]
5022 ?: (itype-family-related actual expected sub) [%unknown ~]
5415 [%bad ~]
5023 [%bad ~]
5416 [%ok u.unified next]
5024 [%ok u.unified next]
5417 ?: &(?=(%face -.actual) ?=(%face -.expected))
5025 ?: &(?=(%face -.actual) ?=(%face -.expected))
5418 ?. =(name.actual name.expected) [%bad ~]
5026 ?. =(name.actual name.expected) [%bad ~]
5419− $(actual body.actual, expected body.expected, skip-width |, spine-proof |)
5027+ $(actual body.actual, expected body.expected)
5420− ?: ?=(%face -.actual) $(actual body.actual, skip-width |, spine-proof |)
5028+ ?: ?=(%face -.actual) $(actual body.actual)
5421− ?: ?=(%face -.expected) $(expected body.expected, skip-width |, spine-proof |)
5029+ ?: ?=(%face -.expected) $(expected body.expected)
5422− ?: &(!uncertain (itype-closed-gates-match actual expected)) [%ok sub next]
5423 ?: (itype-face-asym actual expected sub) [%unknown ~]
5030 ?: (itype-face-asym actual expected sub) [%unknown ~]
5424 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5031 ?: |((itype-has-any-atom actual sub) (itype-has-any-atom expected sub))
5425 [%unknown ~]
5032 [%unknown ~]
5426 =/ unified=(unit isub) (itype-unify actual expected sub)
5033 =/ unified=(unit isub) (itype-unify actual expected sub)
5427 ?~ unified
5034 ?~ unified
5428− ?: |((itype-has-union (itype-normalize actual sub)) (itype-has-union (itype-normalize expected sub))) [%unknown ~]
5429− ?: |((itype-has-recursive (itype-normalize actual sub)) (itype-has-recursive (itype-normalize expected sub))) [%unknown ~]
5430 ?: (itype-family-related actual expected sub) [%unknown ~]
5035 ?: (itype-family-related actual expected sub) [%unknown ~]
5431 [%bad ~]
5036 [%bad ~]
5432 [%ok u.unified next]
5037 [%ok u.unified next]
@@ -5455,226 +5060,25 @@
5455 ["a shared type variable should reject incompatible arguments" problems]
5060 ["a shared type variable should reject incompatible arguments" problems]
5456 =? problems ?=(~ (itype-unify same fine ~))
5061 =? problems ?=(~ (itype-unify same fine ~))
5457 ["a shared type variable should accept equal arguments" problems]
5062 ["a shared type variable should accept equal arguments" problems]
5458− =/ list-a=itype [%collection %list ~[a]]
5459− =/ list-t=itype [%collection %list ~[txt]]
5460− =/ list-n=itype [%collection %list ~[num]]
5461− =? problems ?=(^ (itype-unify a list-a ~))
5462− ["occurs check should look through collection arguments" problems]
5463− =? problems !=((itype-vars list-a) ~[0])
5464− ["generalization should see collection argument variables" problems]
5465− =? problems !=((itype-rename list-a ~[[0 num]]) list-n)
5466− ["instantiation should rename collection argument variables" problems]
5467− =? problems ?=(^ (itype-unify list-t list-n ~))
5468− ["collection arguments with different auras should conflict" problems]
5469− =? problems ?=(^ (itype-unify list-t [%collection %unit ~[txt]] ~))
5470− ["different collection names should conflict" problems]
5471− =? problems !(itype-family-related list-t [%collection %list ~[[%atom 'tD']]] ~)
5472− ["collection arguments should preserve aura-family uncertainty" problems]
5473− =? problems !(itype-face-asym [%collection %list ~[[%face %x txt]]] list-t ~)
5474− ["collection arguments should preserve face uncertainty" problems]
5475− =/ recursive=itype [%recursive %fixture %chain `'chain.fixture']
5476− =/ same-recursive=itype [%recursive %fixture %chain ~]
5477− =/ other-recursive=itype [%recursive %other %chain `'chain.other']
5478− =? problems ?=(~ (itype-unify recursive same-recursive ~))
5479− ["recursive identity should not depend on its visible name" problems]
5480− =? problems ?=(^ (itype-unify recursive other-recursive ~))
5481− ["recursive identity should include the source module" problems]
5482− =/ recursive-fit=ifit (itype-fit recursive txt ~ 0)
5483− =? problems !?=(%unknown -.recursive-fit)
5484− ["opaque recursive types should not be unfolded by a fit" problems]
5485− =/ nested-fit=ifit
5486− (itype-fit [%collection %list ~[a]] list-t ~[[0 recursive]] 1)
5487− =? problems !?=(%unknown -.nested-fit)
5488− ["recursive types behind substitutions should remain uncertain" problems]
5489 problems
5063 problems
5490::
5064::
5491:: The expression inference below is deliberately a fragment: bindings,
5065:: The expression inference below is deliberately a fragment: bindings,
5492−:: simple gates, calls, fixed-aura literals, and some interpolated strings. The
5066+:: simple gates, unary calls, fixed-aura literals, and plain strings. The
5493:: result for unsupported syntax is a diagnostic, never a checked module.
5067:: result for unsupported syntax is a diagnostic, never a checked module.
5494::
5068::
5495+$ ischeme [typ=itype vars=(list @ud)]
5069+$ ischeme [typ=itype vars=(list @ud)]
5496+$ ienv (list [name=term scheme=ischeme])
5070+$ ienv (list [name=term scheme=ischeme])
5497+$ imold-types (list [name=term template=ischeme])
5071+$ imold-types (list [name=term template=ischeme])
5498−+$ iderived [name=term agent=term mark=term]
5072++$ ifile [values=ienv molds=imold-types]
5499−+$ iwidth-definition [name=term original=expr typ=itype sub=isub projections=(list iwprojection)]
5500−+$ iwidth-dependency [at=path source=(unit @t) definitions=(list iwidth-definition)]
5501−:: Nonrecursive request evidence is compiler-owned metadata, not a property
5502−:: of an arbitrary ask value. Reader graphs and source inputs are trusted.
5503−+$ irequest-evidence
5504− [api-at=path name=term path=iapi-path-typed api-source=@t public-source=@t internal-source=@t prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5505−:: A unit distinguishes a verified empty closure from a detached legacy file.
5506−:: The opaque prelude is an exact trusted input, not a recursive interface mold.
5507−+$ irequest-graph
5508− [paths=(set path) requests=(list irequest-evidence) bundle-input=* prelude-input=* prelude-values=(list term) prelude-molds=(list term) externals=iexternals marks=imark-externals]
5509−+$ ifile [values=ienv molds=imold-types at=path derived=(list iderived) elaborations=(list iwidth-definition) dependencies=(list iwidth-dependency) source=(unit @t) graph=(unit irequest-graph)]
5510+$ ijimports (list [face=term interface=ifile])
5073+$ ijimports (list [face=term interface=ifile])
5511−+$ icap [name=@t id=@ud at=span]
5074++$ icaps (list [name=@t id=@ud])
5512−+$ icaps (list icap)
5513+$ iparams (list [name=@t typ=itype])
5075+$ iparams (list [name=@t typ=itype])
5514+$ imolds (list [name=term body=shape])
5076+$ imolds (list [name=term body=shape])
5515:: A caller supplies the exact noun returned by +read-mold:jibb-import.
5077:: A caller supplies the exact noun returned by +read-mold:jibb-import.
5516:: This core has no Ford dependencies; unrecognized payloads fail closed.
5078:: This core has no Ford dependencies; unrecognized payloads fail closed.
5517+$ iexternals (list [module=term name=term result=*])
5079+$ iexternals (list [module=term name=term result=*])
5518+$ imark-externals (list [mark=term result=*])
5080+$ imark-externals (list [mark=term result=*])
5519−:: Hole obligations survive discarded expressions until their owning
5520−:: definition has inferred; their source spans support unresolved reports.
5521−+$ ihole [id=@ud at=span]
5522−:: Recursive-mold unfolding spends fuel in the threaded inference state.
5523−:: Retries can restart from an earlier state, so this bounds an attempt,
5524−:: not all parsing or module-checking work.
5525−:: Experimental: only closed, uniquely faced records have known axes.
5526−+$ iwfield [name=term axis=@ud typ=itype]
5527−+$ iwfields [order=(list iwfield) index=(map term iwfield)]
5528−+$ iwstep [name=term axis=@ud]
5529−+$ iwidth-result [steps=(list iwstep) sub=isub next=@ud]
5530−+$ iwprojection [at=span original=expr source=itype target=itype steps=(list iwstep)]
5531−++ width-scan
5532− |= [typ=itype sub=isub axis=@ud fuel=@ud]
5533− ^- (unit iwfields)
5534− =/ order=(list iwfield) ~
5535− =/ index=(map term iwfield) *(map term iwfield)
5536− |-
5537− ?: =(0 fuel) ~
5538− ?: |(?=(%var -.typ) ?=(%avar -.typ) ?=(%rvar -.typ) ?=(%nvar -.typ) ?=(%rnvar -.typ)) ~
5539− ?: ?=(%face -.typ)
5540− =/ entry=iwfield [name.typ axis body.typ]
5541− ?: ?=(^ (~(get by index) name.entry)) ~
5542− `[(flop [entry order]) (~(put by index) name.entry entry)]
5543− ?. ?=(%cell -.typ) ~
5544− =/ head=itype hed.typ
5545− ?: |(?=(%var -.head) ?=(%avar -.head) ?=(%rvar -.head) ?=(%nvar -.head) ?=(%rnvar -.head)) ~
5546− ?. ?=(%face -.head) ~
5547− =/ entry=iwfield [name.head (mul 2 axis) body.head]
5548− ?: ?=(^ (~(get by index) name.entry)) ~
5549− $(typ tal.typ, axis +((mul 2 axis)), fuel (dec fuel), order [entry order], index (~(put by index) name.entry entry))
5550−++ width-in-order
5551− |= [source=(list iwfield) target=(list iwfield)]
5552− ^- ?
5553− ?~ target &
5554− ?~ source |
5555− ?: =(name.i.source name.i.target) $(source t.source, target t.target)
5556− $(source t.source)
5557−++ width-fit-fields
5558− |= [source=(map term iwfield) target=(list iwfield) sub=isub next=@ud]
5559− ^- (unit iwidth-result)
5560− ?~ target `[~ sub next]
5561− =/ found=(unit iwfield) (~(get by source) name.i.target)
5562− ?~ found ~
5563− =/ fit=ifit (itype-fit typ.u.found typ.i.target sub next)
5564− ?. ?=(%ok -.fit) ~
5565− =/ rest=(unit iwidth-result) $(target t.target, sub sub.fit, next next.fit)
5566− ?~ rest ~
5567− `[[[name.i.target axis.u.found] steps.u.rest] sub.u.rest next.u.rest]
5568−++ width-spine-exhausted
5569− |= [t=itype fuel=@ud]
5570− ^- ?
5571− ?: =(0 fuel) &
5572− ?. ?=(%cell -.t) |
5573− ?. ?=(%face -.hed.t) |
5574− $(t tal.t, fuel (dec fuel))
5575−++ width-known-shape
5576− |= [actual=itype expected=itype sub=isub]
5577− ^- (unit [source=iwfields target=iwfields])
5578− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5579− =/ source=(unit iwfields) (width-scan actual sub 1 1.024)
5580− =/ target=(unit iwfields) (width-scan expected sub 1 1.024)
5581− ?~ source ~
5582− ?~ target ~
5583− `[u.source u.target]
5584−::
5585−++ width-shape
5586− |= [actual=itype expected=itype sub=isub]
5587− ^- (unit [source=iwfields target=iwfields])
5588− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
5589− =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5590− =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5591− ?~ source ~
5592− ?~ target ~
5593− ?. (gth (lent order.u.source) (lent order.u.target)) ~
5594− `[u.source u.target]
5595−++ width-proj-shape
5596− |= [actual=itype expected=itype sub=isub]
5597− ^- (unit [source=iwfields target=iwfields])
5598− ?. &(|(?=(%cell -.actual) ?=(%face -.actual)) |(?=(%cell -.expected) ?=(%face -.expected))) ~
5599− =/ source=(unit iwfields) (width-scan actual sub 1 4.096)
5600− =/ target=(unit iwfields) (width-scan expected sub 1 4.096)
5601− ?~ source ~
5602− ?~ target ~
5603− ?: (lth (lent order.u.source) (lent order.u.target)) ~
5604− `[u.source u.target]
5605−::
5606−++ width-project
5607− |= [shape=[source=iwfields target=iwfields] sub=isub next=@ud]
5608− ^- (unit iwidth-result)
5609− ?. (width-in-order order.source.shape order.target.shape) ~
5610− (width-fit-fields index.source.shape order.target.shape sub next)
5611−::
5612−:: Provisional, globally budgeted gate-free proof. %no includes a
5613−:: gate-bearing witness; an uninhabited sibling could invalidate it.
5614−:: Input types must be resolved and normalized under valid substitutions,
5615−:: from trusted source-backed interfaces and reader results. Collection
5616−:: list/unit names rely on their existing identity invariant; this arm
5617−:: does not validate fabricated internal types.
5618−+$ igf-segment
5619− $% [%field name=term]
5620− [%head ~]
5621− [%tail ~]
5622− [%item ~]
5623− [%case index=@ud]
5624− ==
5625−+$ igate-free [verdict=?(%yes %no %unknown) inhabited=? left=@ud path=(unit (list igf-segment))]
5626−++ gate-free-types
5627− |= [types=(list itype) fuel=@ud path=(list igf-segment) index=@ud]
5628− ^- igate-free
5629− ?~ types [%yes | fuel ~]
5630− ?: =(0 fuel) [%unknown | 0 ~]
5631− =/ first=igate-free (gate-free-type i.types fuel [[%case index] path])
5632− ?: =(%no verdict.first) first
5633− =/ rest=igate-free $(types t.types, fuel left.first, index +(index))
5634− ?: =(%no verdict.rest) rest
5635− =/ inhabited=? |(inhabited.first inhabited.rest)
5636− ?: |(=(%unknown verdict.first) =(%unknown verdict.rest)) [%unknown inhabited left.rest ~]
5637− [%yes inhabited left.rest ~]
5638−++ gate-free-type
5639− |= [typ=itype fuel=@ud path=(list igf-segment)]
5640− ^- igate-free
5641− ?: =(0 fuel) [%unknown | 0 ~]
5642− =. fuel (dec fuel)
5643− ?- -.typ
5644− %fn [%no & fuel `(flop path)]
5645− %atom [%yes & fuel ~]
5646− %any-atom [%yes & fuel ~]
5647− %flag [%yes & fuel ~]
5648− %const [%yes & fuel ~]
5649− %face $(typ body.typ, path [[%field name.typ] path])
5650− %cell
5651− =/ head=igate-free $(typ hed.typ, path [[%head ~] path])
5652− =/ tail=igate-free $(typ tal.typ, fuel left.head, path [[%tail ~] path])
5653− =/ inhabited=? &(inhabited.head inhabited.tail)
5654− ?: &(=(%no verdict.head) inhabited.tail) head(left left.tail)
5655− ?: &(=(%no verdict.tail) inhabited.head) tail
5656− ?: |(!=(%yes verdict.head) !=(%yes verdict.tail)) [%unknown inhabited left.tail ~]
5657− [%yes inhabited left.tail ~]
5658− %collection
5659− ?. |(=(%list name.typ) =(%unit name.typ)) [%unknown | fuel ~]
5660− ?. ?=([* ~] args.typ) [%unknown | fuel ~]
5661− =/ item=igate-free $(typ i.args.typ, path [[%item ~] path])
5662− item(inhabited &)
5663− %union
5664− ?~ cases.typ [%unknown | fuel ~]
5665− (gate-free-types cases.typ fuel path 0)
5666− %noun [%unknown & fuel ~]
5667− %var [%unknown | fuel ~]
5668− %avar [%yes & fuel ~]
5669− %rvar [%yes & fuel ~]
5670− %nvar [%yes & fuel ~]
5671− %rnvar [%yes & fuel ~]
5672− %tag [%unknown | fuel ~]
5673− %recursive [%unknown | fuel ~]
5674− %jrec [%yes & fuel ~]
5675− ==
5676−::
5677−+$ istate [next=@ud sub=isub caps=icaps binders=(list @ud) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) params=iparams active=(list term) tags=(list ipending) in-mold=? at=path top-molds=(list term) prelude=(unit ifile) holes=(list ihole) jrec-fuel=@ud projections=(list iwprojection)]
5081++$ 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 @ud) in-mold=?]
5678+$ idiag [msg=tape sites=(list [at=span note=tape])]
5082+$ idiag [msg=tape sites=(list [at=span note=tape])]
5679+$ iresult (each [typ=itype state=istate] idiag)
5083+$ iresult (each [typ=itype state=istate] idiag)
5680+$ isample-result (each [typ=itype env=ienv state=istate] tape)
5084+$ isample-result (each [typ=itype env=ienv state=istate] tape)
@@ -5694,9 +5098,8 @@
5694 |= [t=itype sub=isub]
5098 |= [t=itype sub=isub]
5695 ^- itype
5099 ^- itype
5696 =. t (itype-walk t sub)
5100 =. t (itype-walk t sub)
5697− ?: ?=(%collection -.t) [%collection name.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5698 ?: ?=(%union -.t)
5101 ?: ?=(%union -.t)
5699− [%union (turn cases.t |=(c=itype (itype-normalize c sub))) origin.t label.t (turn args.t |=(c=itype (itype-normalize c sub)))]
5102+ [%union (turn cases.t |=(c=itype (itype-normalize c sub)))]
5700 ?: ?=(%face -.t)
5103 ?: ?=(%face -.t)
5701 [%face name.t $(t body.t)]
5104 [%face name.t $(t body.t)]
5702 ?: ?=(%fn -.t)
5105 ?: ?=(%fn -.t)
@@ -5710,30 +5113,22 @@
5710:: generalize an aura from its sample, which requires constraint analysis
5113:: generalize an aura from its sample, which requires constraint analysis
5711:: beyond this fragment; leave those cases unresolved.
5114:: beyond this fragment; leave those cases unresolved.
5712::
5115::
5713−:: This helper only controls decimal defaulting in visible types. A noun
5714−:: may contain gates and is not proof of a gate-free value.
5715++ itype-has-gate
5116++ itype-has-gate
5716 |= t=itype
5117 |= t=itype
5717 ^- ?
5118 ^- ?
5718 ?- -.t
5119 ?- -.t
5719 %fn &
5120 %fn &
5720 %cell |($(t hed.t) $(t tal.t))
5121 %cell |($(t hed.t) $(t tal.t))
5721− %recursive |
5722− %jrec |
5723− %collection (lien args.t |=(c=itype (itype-has-gate c)))
5724 %face $(t body.t)
5122 %face $(t body.t)
5725 %union (lien cases.t |=(c=itype (itype-has-gate c)))
5123 %union (lien cases.t |=(c=itype (itype-has-gate c)))
5726 %tag |
5124 %tag |
5727 %const |
5125 %const |
5728 %var |
5126 %var |
5729 %avar |
5127 %avar |
5730− %rvar |
5731 %nvar |
5128 %nvar |
5732− %rnvar |
5733 %atom |
5129 %atom |
5734 %any-atom |
5130 %any-atom |
5735 %flag |
5131 %flag |
5736− %noun |
5737 ==
5132 ==
5738::
5133::
5739++ default-decimals
5134++ default-decimals
@@ -5742,130 +5137,24 @@
5742 ?: (itype-has-gate t) t
5137 ?: (itype-has-gate t) t
5743 ?- -.t
5138 ?- -.t
5744 %nvar [%atom %ud]
5139 %nvar [%atom %ud]
5745− %rnvar [%atom %ud]
5746− %collection [%collection name.t (turn args.t |=(c=itype (default-decimals c)))]
5747 %face [%face name.t $(t body.t)]
5140 %face [%face name.t $(t body.t)]
5748 %cell [%cell $(t hed.t) $(t tal.t)]
5141 %cell [%cell $(t hed.t) $(t tal.t)]
5749 * t
5142 * t
5750 ==
5143 ==
5751::
5144::
5752−:: A hole is solved only by a fully determined type or a written
5753−:: in-scope type variable. Ordinary fresh variables are not evidence.
5754−:: Compare representatives after substitution, since unification can
5755−:: orient a written capital toward the hole rather than the reverse.
5756−++ hole-variable-id
5757− |= t=itype
5758− ^- (unit @ud)
5759− ?- -.t
5760− %var `id.t
5761− %avar `id.t
5762− %rvar `id.t
5763− %nvar `id.t
5764− %rnvar `id.t
5765− %tag `id.t
5766− * ~
5767− ==
5768−++ hole-same-variable
5769− |= [a=itype b=itype]
5770− ^- ?
5771− =/ x=(unit @ud) (hole-variable-id a)
5772− ?~ x |
5773− =/ y=(unit @ud) (hole-variable-id b)
5774− ?~ y |
5775− =(u.x u.y)
5776−++ hole-known
5777− |= [t=itype state=istate]
5778− ^- ?
5779− =. t (itype-walk t sub.state)
5780− ?- -.t
5781− ?(%var %avar %rvar %nvar %rnvar)
5782− ?: (lien caps.state |=(c=icap (hole-same-variable t (itype-walk [%var id.c] sub.state)))) &
5783− (lien params.state |=(p=[name=@t typ=itype] (hole-same-variable t (itype-walk typ.p sub.state))))
5784− %tag |
5785− %any-atom &
5786− %union &((levy cases.t |=(c=itype (hole-known c state))) (levy args.t |=(c=itype (hole-known c state))))
5787− %collection (levy args.t |=(c=itype (hole-known c state)))
5788− %face $(t body.t)
5789− %fn &($(t sample.t) $(t product.t))
5790− %cell &($(t hed.t) $(t tal.t))
5791− * &
5792− ==
5793−++ promote-restricted-numbers
5794− |= [state=istate env=ienv]
5795− ^- istate
5796− =/ ids=(list @ud) (turn caps.state |=(c=icap id.c))
5797− =/ free=(list @ud) (free-env-vars env sub.state)
5798− |-
5799− ?~ ids state
5800− =/ t=itype (itype-walk [%var i.ids] sub.state)
5801− ?: &(?=(%rnvar -.t) !(lien free |=(n=@ud =(n +.t))))
5802− $(ids t.ids, state state(sub [[+.t [%rvar +.t]] sub.state]))
5803− $(ids t.ids)
5804−::
5805−++ default-hole-numbers
5806− |= [all=(list ihole) prior=(list ihole) state=istate env=ienv permit=?]
5807− ^- istate
5808− :: Do not default a named capital or a variable captured from env.
5809− ?. permit state
5810− ?: =(all prior) state
5811− ?~ all state
5812− =/ t=itype (itype-walk [%var id.i.all] sub.state)
5813− =/ free=(list @ud) (free-env-vars env sub.state)
5814− =? state &(?=(?(%nvar %rnvar) -.t) !(hole-known t state) !(lien free |=(id=@ud =(id id.t))))
5815− state(sub [[id.t [%atom %ud]] sub.state])
5816− $(all t.all)
5817−::
5818−:: Only obligations created inside this definition belong to it.
5819−++ holes-created
5820− |= [all=(list ihole) prior=(list ihole)]
5821− ^- (list ihole)
5822− ?: =(all prior) ~
5823− ?~ all ~
5824− [i.all $(all t.all)]
5825−++ hole-uncertain
5826− |= [t=itype state=istate]
5827− ^- ?
5828− =. t (itype-walk t sub.state)
5829− ?- -.t
5830− ?(%tag %nvar %rnvar %avar %rvar) !(hole-known t state)
5831− %union |((lien cases.t |=(c=itype (hole-uncertain c state))) (lien args.t |=(c=itype (hole-uncertain c state))))
5832− %collection (lien args.t |=(c=itype (hole-uncertain c state)))
5833− %face $(t body.t)
5834− %fn |($(t sample.t) $(t product.t))
5835− %cell |($(t hed.t) $(t tal.t))
5836− * |
5837− ==
5838−::
5839−++ unresolved-hole
5840− |= [all=(list ihole) prior=(list ihole) state=istate]
5841− ^- (unit idiag)
5842− =/ work=(list ihole) (flop (holes-created all prior))
5843− |-
5844− ?~ work ~
5845− ?: (hole-known [%var id.i.work] state) $(work t.work)
5846− ?: (hole-uncertain [%var id.i.work] state)
5847− `["type hole needs unsupported inference" ~[[at.i.work "type hole"]]]
5848− `["type hole needs a determined type" ~[[at.i.work "unresolved type hole"]]]
5849−::
5850++ itype-vars
5145++ itype-vars
5851 |= t=itype
5146 |= t=itype
5852 ^- (list @ud)
5147 ^- (list @ud)
5853 ?- -.t
5148 ?- -.t
5854 %var ~[id.t]
5149 %var ~[id.t]
5855 %avar ~[id.t]
5150 %avar ~[id.t]
5856− %rvar ~[id.t]
5857 %nvar ~[id.t]
5151 %nvar ~[id.t]
5858− %rnvar ~[id.t]
5859 %atom ~
5152 %atom ~
5860 %any-atom ~
5153 %any-atom ~
5861 %flag ~
5154 %flag ~
5862− %noun ~
5863 %tag ~
5155 %tag ~
5864 %const ~
5156 %const ~
5865− %union (zing (turn (weld args.t cases.t) |=(c=itype (itype-vars c))))
5157+ %union (zing (turn cases.t |=(c=itype (itype-vars c))))
5866− %recursive ~
5867− %jrec ~
5868− %collection (zing (turn args.t |=(c=itype (itype-vars c))))
5869 %face $(t body.t)
5158 %face $(t body.t)
5870 %fn (weld $(t sample.t) $(t product.t))
5159 %fn (weld $(t sample.t) $(t product.t))
5871 %cell (weld $(t hed.t) $(t tal.t))
5160 %cell (weld $(t hed.t) $(t tal.t))
@@ -5892,28 +5181,16 @@
5892 =/ found=(unit itype) (itype-lookup id.t ren)
5181 =/ found=(unit itype) (itype-lookup id.t ren)
5893 ?~ found t
5182 ?~ found t
5894 u.found
5183 u.found
5895− %rvar
5896− =/ found=(unit itype) (itype-lookup id.t ren)
5897− ?~ found t
5898− u.found
5899 %nvar
5184 %nvar
5900 =/ found=(unit itype) (itype-lookup id.t ren)
5185 =/ found=(unit itype) (itype-lookup id.t ren)
5901 ?~ found t
5186 ?~ found t
5902 u.found
5187 u.found
5903− %rnvar
5904− =/ found=(unit itype) (itype-lookup id.t ren)
5905− ?~ found t
5906− u.found
5907 %atom t
5188 %atom t
5908 %any-atom t
5189 %any-atom t
5909 %flag t
5190 %flag t
5910− %noun t
5911 %tag t
5191 %tag t
5912 %const t
5192 %const t
5913− %union [%union (turn cases.t |=(c=itype (itype-rename c ren))) origin.t label.t (turn args.t |=(c=itype (itype-rename c ren)))]
5193+ %union [%union (turn cases.t |=(c=itype (itype-rename c ren)))]
5914− %recursive t
5915− %jrec t
5916− %collection [%collection name.t (turn args.t |=(c=itype (itype-rename c ren)))]
5917 %face [%face name.t $(t body.t)]
5194 %face [%face name.t $(t body.t)]
5918 %fn [%fn $(t sample.t) $(t product.t)]
5195 %fn [%fn $(t sample.t) $(t product.t)]
5919 %cell [%cell $(t hed.t) $(t tal.t)]
5196 %cell [%cell $(t hed.t) $(t tal.t)]
@@ -5928,42 +5205,13 @@
5928 ?- -.t
5205 ?- -.t
5929 %var |
5206 %var |
5930 %avar =(n id.t)
5207 %avar =(n id.t)
5931− %rvar =(n id.t)
5932 %nvar =(n id.t)
5208 %nvar =(n id.t)
5933− %rnvar =(n id.t)
5934− %atom |
5935− %any-atom |
5936− %flag |
5937− %noun |
5938− %tag |
5939− %const |
5940− %union |((lien cases.t |=(c=itype (itype-var-is-atom n c))) (lien args.t |=(c=itype (itype-var-is-atom n c))))
5941− %recursive |
5942− %jrec |
5943− %collection (lien args.t |=(c=itype (itype-var-is-atom n c)))
5944− %face $(t body.t)
5945− %fn |($(t sample.t) $(t product.t))
5946− %cell |($(t hed.t) $(t tal.t))
5947− ==
5948−++ itype-var-is-restricted
5949− |= [n=@ud t=itype]
5950− ^- ?
5951− ?- -.t
5952− %var |
5953− %avar |
5954− %rvar =(n id.t)
5955− %nvar |
5956− %rnvar |
5957 %atom |
5209 %atom |
5958 %any-atom |
5210 %any-atom |
5959 %flag |
5211 %flag |
5960− %noun |
5961 %tag |
5212 %tag |
5962 %const |
5213 %const |
5963− %union |((lien cases.t |=(c=itype (itype-var-is-restricted n c))) (lien args.t |=(c=itype (itype-var-is-restricted n c))))
5214+ %union (lien cases.t |=(c=itype (itype-var-is-atom n c)))
5964− %recursive |
5965− %jrec |
5966− %collection (lien args.t |=(c=itype (itype-var-is-restricted n c)))
5967 %face $(t body.t)
5215 %face $(t body.t)
5968 %fn |($(t sample.t) $(t product.t))
5216 %fn |($(t sample.t) $(t product.t))
5969 %cell |($(t hed.t) $(t tal.t))
5217 %cell |($(t hed.t) $(t tal.t))
@@ -5979,7 +5227,7 @@
5979 =/ n=@ud 0
5227 =/ n=@ud 0
5980 |-
5228 |-
5981 ?~ vars (itype-rename t ren)
5229 ?~ vars (itype-rename t ren)
5982− =/ replacement=itype ?:((itype-var-is-restricted i.vars t) [%rvar n] ?:((itype-var-is-atom i.vars t) [%avar n] [%var n]))
5230+ =/ replacement=itype ?:((itype-var-is-atom i.vars t) [%avar n] [%var n])
5983 $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
5231 $(vars t.vars, ren [[i.vars replacement] ren], n +(n))
5984::
5232::
5985++ instantiate-scheme
5233++ instantiate-scheme
@@ -5990,11 +5238,11 @@
5990 |-
5238 |-
5991 ?~ vars [(itype-rename typ.scheme ren) state]
5239 ?~ vars [(itype-rename typ.scheme ren) state]
5992 =/ replacement=itype
5240 =/ replacement=itype
5993− ?:((itype-var-is-restricted i.vars typ.scheme) [%rvar next.state] ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state]))
5241+ ?:((itype-var-is-atom i.vars typ.scheme) [%avar next.state] [%var next.state])
5994 :: A generalized atom variable is a valid origin for re-generalizing
5242 :: A generalized atom variable is a valid origin for re-generalizing
5995 :: an alias, just as a sample binder is.
5243 :: an alias, just as a sample binder is.
5996 =/ st=istate state(next +(next.state))
5244 =/ st=istate state(next +(next.state))
5997− =? binders.st |(?=(%avar -.replacement) ?=(%rvar -.replacement)) [next.state binders.state]
5245+ =? binders.st ?=(%avar -.replacement) [next.state binders.state]
5998 $(vars t.vars, ren [[i.vars replacement] ren], state st)
5246 $(vars t.vars, ren [[i.vars replacement] ren], state st)
5999::
5247::
6000++ icap-lookup
5248++ icap-lookup
@@ -6025,12 +5273,9 @@
6025 $(ds t.ds)
5273 $(ds t.ds)
6026::
5274::
6027::
5275::
6028−:: The caller supplies unchanged results from the source-aware importer.
5276+:: The importer owns its algebra. Fixed atoms, cells and Jibb-named faces
6029−:: That boundary is trusted for source provenance: a fork alone cannot
5277+:: are decoded recursively. Singletons, unions, collections, recursive
6030−:: reveal cases Hoon collapsed before it was constructed. Validate the
5278+:: references and invalid face names remain unsupported, never widened.
6031−:: supplied graph independently, including pairwise disjointness. Fixed
6032−:: atoms, term singletons, cells, faces and proven forks are decoded;
6033−:: unsupported singletons, collections and recursive references fail.
6034::
5279::
6035++ jibb-face-name
5280++ jibb-face-name
6036 |= name=@
5281 |= name=@
@@ -6040,180 +5285,16 @@
6040 ?. (is-lower i.chars) |
5285 ?. (is-lower i.chars) |
6041 (levy t.chars |=(c=@tD (in c name-mask)))
5286 (levy t.chars |=(c=@tD (in c name-mask)))
6042::
5287::
6043−:: A source-aware reader result is trusted for origin. Validate every
6044−:: supplied branch and keep the recursive mold opaque: unfolding its
6045−:: root while naming only its tail would change its type identity.
6046−+$ irec-pattern [pat=upat has=?]
6047−++ rec-pattern
6048− |= [node=* module=term name=term]
6049− ^- (unit irec-pattern)
6050− ?@ node ~
6051− ?+ -.node ~
6052− %atom
6053− ?: ?=([%atom %n [~ @]] node)
6054− ?. =(0 +>+.node) ~
6055− `[[%atom `0] |]
6056− ?: ?=([%atom %tas [~ @]] node)
6057− =/ value=@ +>+.node
6058− ?. |(=(value 0) (jibb-face-name value)) ~
6059− `[[%atom `value] |]
6060− ?. ?=([%atom @ ~] node) ~
6061− =/ aura=@ta (@ta +<.node)
6062− ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
6063− `[[%atom ~] |]
6064− %ref
6065− ?. ?=([%ref @ @] node) ~
6066− ?. &(=(module +<.node) =(name +>.node)) ~
6067− `[[%unknown ~] &]
6068− %apply
6069− ?. ?=([%apply %list [* ~]] node) ~
6070− =/ item $(node -.+>.node)
6071− ?~ item ~
6072− `[[%or ~[[%atom `0] [%cell pat.u.item [%unknown ~]]]] has.u.item]
6073− %face
6074− ?. ?=([%face @ *] node) ~
6075− ?. (jibb-face-name +<.node) ~
6076− $(node +>.node)
6077− %cell
6078− ?. ?=([%cell * *] node) ~
6079− =/ left $(node +<.node)
6080− ?~ left ~
6081− =/ right $(node +>.node)
6082− ?~ right ~
6083− `[[%cell pat.u.left pat.u.right] |(has.u.left has.u.right)]
6084− %fork
6085− =/ cases (rec-patterns +.node module name)
6086− ?~ cases ~
6087− ?~ pats.u.cases ~
6088− ?~ t.pats.u.cases ~
6089− ?. (rec-patterns-disjoint pats.u.cases) ~
6090− `[[%or pats.u.cases] has.u.cases]
6091− ==
6092−::
6093−++ rec-patterns
6094− |= [nodes=* module=term name=term]
6095− ^- (unit [pats=(list upat) has=?])
6096− ?@ nodes ?:(=(nodes 0) `[~ |] ~)
6097− =/ first (rec-pattern -.nodes module name)
6098− ?~ first ~
6099− =/ rest $(nodes +.nodes)
6100− ?~ rest ~
6101− `[[pat.u.first pats.u.rest] |(has.u.first has.u.rest)]
6102−::
6103−++ rec-patterns-disjoint
6104− |= pats=(list upat)
6105− ^- ?
6106− ?~ pats &
6107− ?. (levy t.pats |=(p=upat =(%disjoint (union-relate i.pats p)))) |
6108− $(pats t.pats)
6109−::
6110−::
6111−::
6112−:: Repeated faces along an imported record spine fail closed. Hoon's type
6113−:: graph can erase unfaced nested-cell boundaries, so that alone does not
6114−:: prove the original source repeated a name within one record. A faced
6115−:: body and each union alternative have separate scopes. Check recursive
6116−:: roots before making them opaque; unused molds are never inspected.
6117−::
6118−++ imported-faces-valid
6119− |= node=*
6120− ^- ?
6121− ?@ node &
6122− ?+ -.node &
6123− %face ?:(?=([%face @ *] node) $(node +>.node) |)
6124− %cell ?:(?=([%cell * *] node) (imported-record-faces-valid node ~) |)
6125− %fork (imported-faces-valid-list +.node)
6126− %apply ?:(?=([%apply @ *] node) (imported-faces-valid-list +>.node) |)
6127− %named
6128− ?. ?=([%named @ @ *] node) |
6129− =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
6130− (imported-faces-valid body.n)
6131− ==
6132−::
6133−++ imported-faces-valid-list
6134− |= nodes=*
6135− ^- ?
6136− ?@ nodes =(nodes 0)
6137− ?. (imported-faces-valid -.nodes) |
6138− $(nodes +.nodes)
6139−::
6140−++ imported-record-faces-valid
6141− |= [node=* names=(list @)]
6142− ^- ?
6143− ?: ?=([%cell * *] node)
6144− =/ head=* +<.node
6145− =/ rest=* +>.node
6146− ?: ?=([%face @ *] head)
6147− ?: (lien names |=(n=@ =(n +<.head))) |
6148− ?. (imported-faces-valid +>.head) |
6149− $(node rest, names [+<.head names])
6150− ?. (imported-faces-valid head) |
6151− $(node rest)
6152− ?: ?=([%face @ *] node)
6153− ?: (lien names |=(n=@ =(n +<.node))) |
6154− (imported-faces-valid +>.node)
6155− (imported-faces-valid node)
6156−::
6157++ import-to-itype
5288++ import-to-itype
6158 |= node=*
5289 |= node=*
6159 ^- (unit itype)
5290 ^- (unit itype)
6160 ?@ node ~
5291 ?@ node ~
6161 ?+ -.node ~
5292 ?+ -.node ~
6162− %noun ?:(=(node [%noun ~]) `[%noun ~] ~)
6163 %atom
5293 %atom
6164− :: A Hoon loobean singleton is one of the two Jibb loobeans.
6165− ?: ?=([%atom %f [~ @]] node)
6166− =/ value=@ +>+.node
6167− ?. |(=(value 0) =(value 1)) ~
6168− =/ printed=@t ?:(=(value 0) '%.y' '%.n')
6169− `[%const [%loobean %f value printed]]
6170− :: Hoon's null singleton is the same noun as Jibb's `~` mold.
6171− :: Other non-term singleton atoms remain unsupported here.
6172− ?: ?=([%atom %n [~ @]] node)
6173− ?. =(0 +>+.node) ~
6174− `[%const [%null %n 0 '~']]
6175− ?: ?=([%atom %tas [~ @]] node)
6176− =/ value=@ +>+.node
6177− ?. |(=(value 0) (jibb-face-name value)) ~
6178− =/ printed=@t ?:(=(value 0) '%$' (cat 3 '%' value))
6179− `[%const [%term %tas value printed]]
6180 ?. ?=([%atom @ ~] node) ~
5294 ?. ?=([%atom @ ~] node) ~
6181 =/ aura=@ta (@ta +<.node)
5295 =/ aura=@ta (@ta +<.node)
6182 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
5296 ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
6183 `[%atom aura]
5297 `[%atom aura]
6184− %named
6185− ?. ?=([%named @ @ *] node) ~
6186− =/ n=[%named module=@ name=@ body=*] ;;([%named module=@ name=@ body=*] node)
6187− ?. &((jibb-face-name module.n) (jibb-face-name name.n)) ~
6188− ?. ?=([%fork *] body.n) ~
6189− =/ proof=(unit irec-pattern) (rec-pattern body.n (@tas module.n) (@tas name.n))
6190− ?~ proof ~
6191− ?. has.u.proof ~
6192− `[%recursive (@tas module.n) (@tas name.n) `(crip "{(trip name.n)}.{(trip module.n)}")]
6193− %apply
6194− ?. ?=([%apply @ *] node) ~
6195− =/ name=term (@tas +<.node)
6196− =/ arity=@ud
6197− ?: |(=(%list name) =(%unit name) =(%set name) =(%qeu name)) 1
6198− ?: |(=(%map name) =(%mop name) =(%jar name) =(%jug name)) 2
6199− 0
6200− ?: =(arity 0) ~
6201− =/ args=(unit (list itype)) (import-to-itypes +>.node)
6202− ?~ args ~
6203− ?. =(arity (lent u.args)) ~
6204− `[%collection name u.args]
6205− %fork
6206− :: Hoon's ordinary ? mold is the fork of its two %f singletons.
6207− =/ raw=* +.node
6208− ?: |(=(raw ~[[%atom %f `0] [%atom %f `1]]) =(raw ~[[%atom %f `1] [%atom %f `0]]))
6209− `[%flag ~]
6210− =/ cases=(unit (list itype)) (import-to-itypes raw)
6211− ?~ cases ~
6212− ?~ u.cases ~
6213− ?~ t.u.cases ~
6214− ?: (import-has-loobean-singleton u.cases) ~
6215− ?. (import-cases-disjoint u.cases) ~
6216− `[%union u.cases ~ ~ ~]
6217 %face
5298 %face
6218 ?. ?=([%face @ *] node) ~
5299 ?. ?=([%face @ *] node) ~
6219 =/ name=@ +<.node
5300 =/ name=@ +<.node
@@ -6230,52 +5311,6 @@
6230 `[%cell u.left u.right]
5311 `[%cell u.left u.right]
6231 ==
5312 ==
6232::
5313::
6233−++ import-direct-loobean
6234− |= t=itype
6235− ^- ?
6236− ?: ?=(%face -.t) $(t body.t)
6237− ?: ?=(%union -.t) (import-has-loobean-singleton cases.t)
6238− ?=([%const [%loobean *]] t)
6239−::
6240−++ import-has-loobean-singleton
6241− |= cases=(list itype)
6242− ^- ?
6243− ?~ cases |
6244− ?: (import-direct-loobean i.cases) &
6245− $(cases t.cases)
6246−::
6247−++ import-to-itypes
6248− |= nodes=*
6249− ^- (unit (list itype))
6250− ?@ nodes ?:(=(nodes 0) `~ ~)
6251− =/ first (import-to-itype -.nodes)
6252− ?~ first ~
6253− =/ rest $(nodes +.nodes)
6254− ?~ rest ~
6255− `[u.first u.rest]
6256−::
6257−++ import-type-pattern
6258− |= typ=itype
6259− ^- upat
6260− ?- -.typ
6261− %noun [%all ~]
6262− %atom [%atom ~]
6263− %flag [%or ~[[%atom `0] [%atom `1]]]
6264− %const [%atom `val.literal.typ]
6265− %face $(typ body.typ)
6266− %cell [%cell $(typ hed.typ) $(typ tal.typ)]
6267− %union [%or (turn cases.typ |=(t=itype (import-type-pattern t)))]
6268− * [%unknown ~]
6269− ==
6270−::
6271−++ import-cases-disjoint
6272− |= cases=(list itype)
6273− ^- ?
6274− ?~ cases &
6275− =/ first=upat (import-type-pattern i.cases)
6276− ?. (levy t.cases |=(t=itype =(%disjoint (union-relate first (import-type-pattern t))))) |
6277− $(cases t.cases)
6278−::
6279++ find-imported-mold
5314++ find-imported-mold
6280 |= [module=term name=term externals=iexternals surs=(list term)]
5315 |= [module=term name=term externals=iexternals surs=(list term)]
6281 ^- (unit itype)
5316 ^- (unit itype)
@@ -6287,15 +5322,7 @@
6287 =/ result=* result.i.found
5322 =/ result=* result.i.found
6288 ?@ result ~
5323 ?@ result ~
6289 ?. ?=(%& -.result) ~
5324 ?. ?=(%& -.result) ~
6290− =/ node=* +.result
5325+ (import-to-itype +.result)
6291− ?. (imported-faces-valid node) ~
6292− ?@ node (import-to-itype node)
6293− ?: ?=(%ref -.node) (import-to-itype node)
6294− =/ pattern=(unit irec-pattern) (rec-pattern node module name)
6295− ?~ pattern (import-to-itype node)
6296− ?. has.u.pattern (import-to-itype node)
6297− `[%recursive module name `(crip "{(trip name)}.{(trip module)}")]
6298−
6299::
5326::
6300++ collect-sur-imports
5327++ collect-sur-imports
6301 |= imports=(list import)
5328 |= imports=(list import)
@@ -6324,7 +5351,6 @@
6324 =/ result=* result.i.found
5351 =/ result=* result.i.found
6325 ?@ result ~
5352 ?@ result ~
6326 ?. ?=(%& -.result) ~
5353 ?. ?=(%& -.result) ~
6327− ?. (imported-faces-valid +.result) ~
6328 (import-to-itype +.result)
5354 (import-to-itype +.result)
6329::
5355::
6330++ find-jibb-interface
5356++ find-jibb-interface
@@ -6343,103 +5369,9 @@
6343 ?: =(name name.i.ms) `template.i.ms
5369 ?: =(name name.i.ms) `template.i.ms
6344 $(ms t.ms)
5370 $(ms t.ms)
6345::
5371::
6346−:: An exported alias may name a union from another module. Only a
6347−:: nongeneric alias of the same origin is usable through this import face.
6348−::
6349−++ imported-union-alias
6350− |= [origin=[at=path name=term] molds=imold-types]
6351− ^- (unit term)
6352− ?~ molds ~
6353− =/ template=ischeme template.i.molds
6354− ?: &(?=(~ vars.template) ?=(%union -.typ.template))
6355− ?:(=(`origin origin.typ.template) `name.i.molds $(molds t.molds))
6356− $(molds t.molds)
6357−::
6358−:: A prelude union alias is a display name, not a new union identity. An
6359−:: identity-generic alias can carry the origin's arguments only when the
6360−:: origin, arity and ordered parameters match. Swapped, repeated, fixed
6361−:: or phantom parameters cannot be printed that way and remain unsupported
6362−:: when their only available name is private. A nongeneric alias of a
6363−:: generic instantiation cannot be printed with the origin's arguments.
6364−++ identity-union-parameters
6365− |= [vars=(list @ud) args=(list itype)]
6366− ^- ?
6367− ?~ vars ?=(~ args)
6368− ?~ args |
6369− ?. =([%var i.vars] i.args) |
6370− $(vars t.vars, args t.args)
6371−++ prelude-union-alias
6372− |= [origin=[at=path name=term] args=(list itype) molds=imold-types]
6373− ^- (unit term)
6374− ?~ molds ~
6375− =/ template=ischeme template.i.molds
6376− ?. ?=(%union -.typ.template) $(molds t.molds)
6377− ?. =(`origin origin.typ.template) $(molds t.molds)
6378− ?~ vars.template
6379− ?^ args $(molds t.molds)
6380− ?:(=(args args.typ.template) `name.i.molds $(molds t.molds))
6381− ?: &((identity-union-parameters vars.template args.typ.template) =((lent vars.template) (lent args)))
6382− `name.i.molds
6383− $(molds t.molds)
6384−::
6385−:: Names exported by the directly imported module are visible through its
6386−:: face; a matching prelude alias is also visible without a qualifier.
6387−::
6388−++ jrec-alias
6389− |= [origin=path name=term molds=imold-types]
6390− ^- (unit term)
6391− ?~ molds ~
6392− =/ template=ischeme template.i.molds
6393− ?: &(?=(~ vars.template) ?=(%jrec -.typ.template) =(at.typ.template origin) =(name.typ.template name)) `name.i.molds
6394− $(molds t.molds)
6395−::
6396−++ itype-in-import
6397− |= [t=itype iface=ifile face=term prelude=(unit ifile)]
6398− ^- itype
6399− ?- -.t
6400− %union
6401− =/ label=(unit @t)
6402− ?~ origin.t ~
6403− ?: =(at.u.origin.t /lib/jibb/prelude/jibb) `name.u.origin.t
6404− =/ public=(unit term)
6405− ?~ prelude ~
6406− (prelude-union-alias u.origin.t args.t molds.u.prelude)
6407− ?^ public `u.public
6408− =/ alias=(unit term) ~
6409− =? alias &(=(at.u.origin.t at.iface) ?=(^ (find-jibb-mold name.u.origin.t iface))) `name.u.origin.t
6410− =? alias ?=(~ alias) (imported-union-alias u.origin.t molds.iface)
6411− ?~ alias ~
6412− `(crip "{(trip u.alias)}.{(trip face)}")
6413− [%union (turn cases.t |=(c=itype (itype-in-import c iface face prelude))) origin.t label (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
6414− %recursive [%recursive module.t name.t ~]
6415− %jrec
6416− =/ public=(unit term) ?~(prelude ~ (jrec-alias at.t name.t molds.u.prelude))
6417− ?^ public t(label `u.public)
6418− =/ alias=(unit term) (jrec-alias at.t name.t molds.iface)
6419− ?~ alias t(label ~)
6420− t(label `(crip "{(trip u.alias)}.{(trip face)}"))
6421− %collection [%collection name.t (turn args.t |=(c=itype (itype-in-import c iface face prelude)))]
6422− %face [%face name.t $(t body.t)]
6423− %fn [%fn $(t sample.t) $(t product.t)]
6424− %cell [%cell $(t hed.t) $(t tal.t)]
6425− * t
6426− ==
6427−::
6428−++ label-direct-union
6429− |= [typ=itype body=shape name=term state=istate]
6430− ^- itype
6431− ?. ?=(%union -.typ) typ
6432− =/ direct=? ?=(%union -.body)
6433− =? direct ?=(%generic -.body) ?=(%union -.body.body)
6434− ?. direct typ
6435− ?. (lien top-molds.state |=(n=term =(n name))) typ
6436− [%union cases.typ `[at.state name] `name args.typ]
6437−::
6438:: Generic mold parameters are lexical and distinct from the enclosing
5372:: Generic mold parameters are lexical and distinct from the enclosing
6439:: value's capital variables. Arguments are substituted only once, so
5373:: value's capital variables. Arguments are substituted only once, so
6440:: an argument's variable ID cannot be captured by a template ID.
5374:: an argument's variable ID cannot be captured by a template ID.
6441−:: A generic alias of a named union keeps the underlying union's origin
6442−:: and substituted argument order; an originless union stays unsupported.
6443::
5375::
6444++ iparam-lookup
5376++ iparam-lookup
6445 |= [name=@t params=iparams]
5377 |= [name=@t params=iparams]
@@ -6491,46 +5423,9 @@
6491 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
5423 =/ rest=[params=iparams vars=(list @ud) next=@ud] $(names t.names, next +(next))
6492 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
5424 [[[i.names [%var next]] params.rest] [next vars.rest] next.rest]
6493::
5425::
6494−:: Recognize a unique top-level source mold with exactly a null case and a
6495−:: faced atom-headed cell whose faced tail names that same mold. Its Jibb
6496−:: path and name provide nominal identity. Other recursive shapes fail closed;
6497−:: construction and matching expose the proven shape one layer at a time.
6498−++ simple-source-recursive
6499− |= [name=term sh=shape state=istate]
6500− ^- (unit itype)
6501− ?. (lien top-molds.state |=(n=term =(n name))) ~
6502− =/ original=(unit shape) (find-simple-mold name molds.state)
6503− ?~ original ~
6504− ?. =(u.original sh) ~
6505− ?. ?=(%union -.sh) ~
6506− =/ cs=(list shape) cases.sh
6507− ?~ cs ~
6508− ?~ t.cs ~
6509− ?^ t.t.cs ~
6510− ?. ?=(%const -.i.cs) ~
6511− ?. =(%null form.lit.i.cs) ~
6512− ?. ?=(%cell -.i.t.cs) ~
6513− =/ fs=(list field) fields.i.t.cs
6514− ?~ fs ~
6515− ?~ t.fs ~
6516− ?^ t.t.fs ~
6517− ?. ?=(%face -.i.fs) ~
6518− ?. ?=(%aura -.shape.i.fs) ~
6519− ?. !=(0 aura.shape.i.fs) ~
6520− ?. ?=(%face -.i.t.fs) ~
6521− ?. !=(name.i.fs name.i.t.fs) ~
6522− =/ tail=shape shape.i.t.fs
6523− ?. ?=(%ref -.tail) ~
6524− ?. =(names.tail ~[name]) ~
6525− `[%jrec at.state name `name name.i.fs aura.shape.i.fs name.i.t.fs]
6526−::
6527++ infer-mold-template
5426++ infer-mold-template
6528 |= [sh=shape state=istate]
5427 |= [sh=shape state=istate]
6529 ^- (unit [template=ischeme state=istate])
5428 ^- (unit [template=ischeme state=istate])
6530− =/ direct=(unit itype)
6531− ?. ?=([@ ~] active.state) ~
6532− (simple-source-recursive i.active.state sh state)
6533− ?^ direct `[[u.direct ~] state]
6534 ?: ?=(%generic -.sh)
5429 ?: ?=(%generic -.sh)
6535 ?~ vars.sh ~
5430 ?~ vars.sh ~
6536 ?. (distinct-params vars.sh) ~
5431 ?. (distinct-params vars.sh) ~
@@ -6538,137 +5433,33 @@
6538 =/ out=(unit [typ=itype state=istate])
5433 =/ out=(unit [typ=itype state=istate])
6539 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
5434 (infer-simple-shape body.sh state(next next.fresh, params params.fresh, in-mold &))
6540 ?~ out ~
5435 ?~ out ~
6541− ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6542− ?: &(?=(%union -.typ.u.out) !?=(%union -.body.sh) ?=(~ origin.typ.u.out)) ~
6543− =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.sh))
6544− typ.u.out(args (turn vars.fresh |=(n=@ud `itype`[%var n])))
6545 =/ used=(list @ud) (itype-vars typ.u.out)
5436 =/ used=(list @ud) (itype-vars typ.u.out)
6546 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
5437 ?. (levy used |=(n=@ud (lien vars.fresh |=(p=@ud =(p n))))) ~
6547− `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5438+ `[[typ.u.out vars.fresh] state.u.out(params params.state, in-mold in-mold.state)]
6548 =/ out=(unit [typ=itype state=istate])
5439 =/ out=(unit [typ=itype state=istate])
6549 (infer-simple-shape sh state(params ~, in-mold &))
5440 (infer-simple-shape sh state(params ~, in-mold &))
6550 ?~ out ~
5441 ?~ out ~
6551− ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6552 ?: ?=(^ (itype-vars typ.u.out)) ~
5442 ?: ?=(^ (itype-vars typ.u.out)) ~
6553− `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state, holes holes.state)]
5443+ `[[typ.u.out ~] state.u.out(params params.state, in-mold in-mold.state)]
6554−::
6555−:: A direct imported reference may carry definite reader evidence. Only
6556−:: uniquely supplied, declared inputs are used; unsupported data stay generic.
6557−++ direct-import-invalid
6558− |= [sh=shape state=istate]
6559− ^- (unit idiag)
6560− ?. ?=(%ref -.sh) ~
6561− ?~ names.sh ~
6562− =/ n=term i.names.sh
6563− =/ raw=*
6564− ?~ t.names.sh
6565− ?. (unique-value-name n marks.state) ~
6566− ?: (lien surs.state |=(x=term =(x n))) ~
6567− ?: ?=(^ (find-jibb-interface n jimports.state)) ~
6568− ?: (lien globals.state |=(x=term =(x n))) ~
6569− ?: (lien reserved-molds.state |=(x=term =(x n))) ~
6570− ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) ~
6571− =/ found=imark-externals (skim mark-externals.state |=(e=[mark=term result=*] =(mark.e n)))
6572− ?~ found ~
6573− ?^ t.found ~
6574− result.i.found
6575− ?^ t.t.names.sh ~
6576− =/ mod=term i.t.names.sh
6577− ?: ?=(^ (find-jibb-interface mod jimports.state)) ~
6578− ?. (unique-value-name mod surs.state) ~
6579− ?: (lien marks.state |=(x=term =(x mod))) ~
6580− ?: (lien globals.state |=(x=term =(x mod))) ~
6581− ?: (lien reserved-molds.state |=(x=term =(x mod))) ~
6582− ?: (lien molds.state |=(m=[name=term body=shape] =(mod name.m))) ~
6583− =/ found=iexternals (skim externals.state |=(e=[module=term name=term result=*] &(=(module.e mod) =(name.e n))))
6584− ?~ found ~
6585− ?^ t.found ~
6586− result.i.found
6587− ?. ?=([%invalid ?(%aura %core) @] raw) ~
6588− `["{(trip +>.raw)}" ~[[at.sh "invalid imported mold"]]]
6589−::
6590−:: Replay only the shape branches whose evaluation order we can prove.
6591−:: Successful prefixes must be checked before descending to a failure.
6592−++ nested-import-invalid
6593− |= [sh=shape state=istate]
6594− ^- (unit idiag)
6595− ?: ?=(^ (infer-simple-shape sh state)) ~
6596− ?- -.sh
6597− %ref
6598− =/ direct=(unit idiag) (direct-import-invalid sh state)
6599− ?^ direct direct
6600− ?~ names.sh ~
6601− ?^ t.names.sh ~
6602− =/ n=term i.names.sh
6603− ?: (lien marks.state |=(x=term =(x n))) ~
6604− ?: (lien active.state |=(x=term =(x n))) ~
6605− =/ found=(unit shape) (find-simple-mold n molds.state)
6606− ?~ found ~
6607− $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6608− %fn
6609− =/ first=(unit [typ=itype state=istate]) (infer-simple-shape sample.sh state)
6610− ?~ first $(sh sample.sh)
6611− $(sh product.sh, state state.u.first)
6612− %cell (nested-field-invalid fields.sh state)
6613− * ~
6614− ==
6615−::
6616−++ nested-field-invalid
6617− |= [fields=(list field) state=istate]
6618− ^- (unit idiag)
6619− ?~ fields ~
6620− =/ sh=shape
6621− ?- -.i.fields
6622− %bare shape.i.fields
6623− %face shape.i.fields
6624− %pun [%ref at.i.fields ~[name.i.fields]]
6625− ==
6626− =/ out=(unit [typ=itype state=istate]) (infer-simple-shape sh state)
6627− ?~ out (nested-import-invalid sh state)
6628− $(fields t.fields, state state.u.out)
6629−::
6630−++ sample-import-invalid
6631− |= [s=sample env=ienv state=istate]
6632− ^- (unit idiag)
6633− =/ result=isample-result (infer-sample s env state)
6634− ?: ?=(%& -.result) ~
6635− ?. =(p.result "sample mold is not supported by partial inference") ~
6636− ?- s
6637− [%face *] (nested-import-invalid shape.s state)
6638− [%bare *] (nested-import-invalid shape.s state)
6639− [%pun *] (nested-import-invalid [%ref at.s ~[name.s]] state)
6640− [%cell *] (nested-samples-invalid items.s env state)
6641− * ~
6642− ==
6643−::
6644−++ nested-samples-invalid
6645− |= [items=(list sample) env=ienv state=istate]
6646− ^- (unit idiag)
6647− ?~ items ~
6648− =/ head=isample-result (infer-sample i.items env state)
6649− ?: ?=(%| -.head) (sample-import-invalid i.items env state)
6650− $(items t.items, env env.p.head, state state.p.head)
6651::
5444::
6652++ infer-simple-shape
5445++ infer-simple-shape
6653 |= [sh=shape state=istate]
5446 |= [sh=shape state=istate]
6654 ^- (unit [typ=itype state=istate])
5447 ^- (unit [typ=itype state=istate])
6655 ?- -.sh
5448 ?- -.sh
6656− %hole `[[%var next.state] state(next +(next.state), holes [[next.state at.sh] holes.state])]
6657 %aura
5449 %aura
6658 ?: =(0 aura.sh) `[[%any-atom ~] state]
5450 ?: =(0 aura.sh) `[[%any-atom ~] state]
6659 `[[%atom aura.sh] state]
5451 `[[%atom aura.sh] state]
6660 %flag `[[%flag ~] state]
5452 %flag `[[%flag ~] state]
6661− %noun `[[%noun ~] state]
6662 %const
5453 %const
6663− ?. |(=(%term form.lit.sh) =(%null form.lit.sh) =(%loobean form.lit.sh)) ~
5454+ ?. =(%term form.lit.sh) ~
6664− ?: &(=(%loobean form.lit.sh) !|(=(0 val.lit.sh) =(1 val.lit.sh))) ~
6665 `[[%const lit.sh] state]
5455 `[[%const lit.sh] state]
6666 %union
5456 %union
6667 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
5457 =/ pairs=(list upair) (union-pairs cases.sh molds.state)
6668 ?. (levy pairs |=(p=upair =(%disjoint relation.p))) ~
5458 ?. (levy pairs |=(p=upair =(%disjoint relation.p))) ~
6669 =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
5459 =/ cs=(unit [types=(list itype) state=istate]) (infer-shape-args cases.sh state)
6670 ?~ cs ~
5460 ?~ cs ~
5461+ ?: (lien types.u.cs |=(t=itype ?=(^ (itype-vars t)))) ~
6671− `[[%union types.u.cs ~ ~ ~] state.u.cs]
5462+ `[[%union types.u.cs] state.u.cs]
6672 %cell (infer-simple-fields fields.sh state)
5463 %cell (infer-simple-fields fields.sh state)
6673 %fn
5464 %fn
6674 =/ arg=(unit [typ=itype state=istate]) $(sh sample.sh)
5465 =/ arg=(unit [typ=itype state=istate]) $(sh sample.sh)
@@ -6686,7 +5477,7 @@
6686 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
5477 =/ found=(unit ischeme) (find-jibb-mold n u.iface)
6687 ?~ found ~
5478 ?~ found ~
6688 ?^ vars.u.found ~
5479 ?^ vars.u.found ~
6689− `[(itype-in-import typ.u.found u.iface i.t.names.sh prelude.state) state]
5480+ `[typ.u.found state]
6690 =/ found=(unit itype)
5481 =/ found=(unit itype)
6691 (find-imported-mold i.t.names.sh n externals.state surs.state)
5482 (find-imported-mold i.t.names.sh n externals.state surs.state)
6692 ?~ found ~
5483 ?~ found ~
@@ -6698,20 +5489,11 @@
6698 `[u.imported state]
5489 `[u.imported state]
6699 ?: (lien active.state |=(x=term =(x n))) ~
5490 ?: (lien active.state |=(x=term =(x n))) ~
6700 =/ found=(unit shape) (find-simple-mold n molds.state)
5491 =/ found=(unit shape) (find-simple-mold n molds.state)
6701− ?~ found
5492+ ?~ found ~
6702− ?: (lien molds.state |=(m=[name=term body=shape] =(name.m n))) ~
6703− ?~ prelude.state ~
6704− =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state)
6705− ?~ prelude-entry ~
6706− ?^ vars.u.prelude-entry ~
6707− `[typ.u.prelude-entry state]
6708− =/ direct=(unit itype) (simple-source-recursive n u.found state)
6709− ?^ direct `[u.direct state]
6710 =/ out=(unit [typ=itype state=istate])
5493 =/ out=(unit [typ=itype state=istate])
6711 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
5494 $(sh u.found, state state(active [n active.state], in-mold &, params ~))
6712 ?~ out ~
5495 ?~ out ~
6713− ?^ (unresolved-hole holes.state.u.out holes.state state.u.out) ~
6714− `[(label-direct-union typ.u.out u.found n state) state.u.out(active active.state, in-mold in-mold.state, params params.state, holes holes.state)]
5496+ `[typ.u.out state.u.out(active active.state, in-mold in-mold.state, params params.state)]
6715 %apply
5497 %apply
6716 ?~ ref.sh ~
5498 ?~ ref.sh ~
6717 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
5499 =/ args=(unit [types=(list itype) state=istate]) (infer-shape-args args.sh state)
@@ -6726,18 +5508,10 @@
6726 ?~ vars.u.template ~
5508 ?~ vars.u.template ~
6727 =/ applied=(unit itype) (template-apply u.template types.u.args)
5509 =/ applied=(unit itype) (template-apply u.template types.u.args)
6728 ?~ applied ~
5510 ?~ applied ~
6729− `[(itype-in-import u.applied u.iface i.t.ref.sh prelude.state.u.args) state.u.args]
5511+ `[u.applied state.u.args]
6730 ?: (lien active.state.u.args |=(x=term =(x n))) ~
5512 ?: (lien active.state.u.args |=(x=term =(x n))) ~
6731 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
5513 =/ found=(unit shape) (find-simple-mold n molds.state.u.args)
6732− ?~ found
5514+ ?~ found ~
6733− ?: (lien molds.state.u.args |=(m=[name=term body=shape] =(name.m n))) ~
6734− ?~ prelude.state.u.args ~
6735− =/ prelude-entry=(unit ischeme) (find-jibb-mold n u.prelude.state.u.args)
6736− ?~ prelude-entry ~
6737− ?~ vars.u.prelude-entry ~
6738− =/ applied=(unit itype) (template-apply u.prelude-entry types.u.args)
6739− ?~ applied ~
6740− `[u.applied state.u.args]
6741 ?. ?=(%generic -.u.found) ~
5515 ?. ?=(%generic -.u.found) ~
6742 ?. (distinct-params vars.u.found) ~
5516 ?. (distinct-params vars.u.found) ~
6743 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
5517 =/ params=(unit iparams) (bind-params vars.u.found types.u.args)
@@ -6745,19 +5519,14 @@
6745 =/ out=(unit [typ=itype state=istate])
5519 =/ out=(unit [typ=itype state=istate])
6746 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
5520 $(sh body.u.found, state state.u.args(active [n active.state.u.args], in-mold &, params u.params))
6747 ?~ out ~
5521 ?~ out ~
6748− ?^ (unresolved-hole holes.state.u.out holes.state.u.args state.u.out) ~
6749− ?: &(?=(%union -.typ.u.out) !?=(%union -.body.u.found) ?=(~ origin.typ.u.out)) ~
6750− ?: &(?=(%union -.typ.u.out) ?=(%union -.body.u.found) !(lien top-molds.state.u.args |=(x=term =(x n)))) ~
6751− =? typ.u.out &(?=(%union -.typ.u.out) ?=(%union -.body.u.found))
6752− (label-direct-union typ.u.out(args types.u.args) u.found n state.u.args)
6753− `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args, holes holes.state.u.args)]
5522+ `[typ.u.out state.u.out(active active.state.u.args, in-mold in-mold.state.u.args, params params.state.u.args)]
6754 %tvar
5523 %tvar
6755 =/ param=(unit itype) (iparam-lookup name.sh params.state)
5524 =/ param=(unit itype) (iparam-lookup name.sh params.state)
6756 ?^ param `[u.param state]
5525 ?^ param `[u.param state]
6757 ?: in-mold.state ~
5526 ?: in-mold.state ~
6758 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
5527 =/ n=(unit @ud) (icap-lookup name.sh caps.state)
6759 ?^ n `[[%var u.n] state]
5528 ?^ n `[[%var u.n] state]
6760− `[[%var next.state] state(next +(next.state), caps [[name.sh next.state at.sh] caps.state])]
5529+ `[[%var next.state] state(next +(next.state), caps [[name.sh next.state] caps.state])]
6761 * ~
5530 * ~
6762 ==
5531 ==
6763::
5532::
@@ -6790,12 +5559,12 @@
6790 ^- isample-result
5559 ^- isample-result
6791 ?- -.s
5560 ?- -.s
6792 %bind
5561 %bind
6793− ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
5562+ ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6794 [%| "sample shadows a name"]
5563 [%| "sample shadows a name"]
6795 =/ t=itype [%var next.state]
5564 =/ t=itype [%var next.state]
6796 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
5565 [%& t [[name.s [t ~]] env] state(next +(next.state), binders [next.state binders.state])]
6797 %face
5566 %face
6798− ?: |(=(name.s %proj) ?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
5567+ ?: |(?=(^ (ienv-lookup name.s env)) (lien globals.state |=(x=term =(x name.s))))
6799 [%| "sample shadows a name"]
5568 [%| "sample shadows a name"]
6800 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
5569 =/ t=(unit [typ=itype state=istate]) (infer-simple-shape shape.s state)
6801 ?~ t [%| "sample mold is not supported by partial inference"]
5570 ?~ t [%| "sample mold is not supported by partial inference"]
@@ -6833,8 +5602,8 @@
6833 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
5602 [%& [%cell ht typ.p.tail] env.p.tail state.p.tail]
6834::
5603::
6835:: Local definitions generalize only variables outside their enclosing
5604:: Local definitions generalize only variables outside their enclosing
6836−:: environment and explicit-capital scope. Recursive gate groups use
5605+:: environment and explicit-capital scope. Unresolved groups stay
6837−:: monomorphic placeholders while their bodies are checked.
5606+:: unsupported: this fragment does not infer recursive definitions.
6838::
5607::
6839+$ ilocal-result (each [env=ienv state=istate] idiag)
5608+$ ilocal-result (each [env=ienv state=istate] idiag)
6840++ free-env-vars
5609++ free-env-vars
@@ -6863,7 +5632,6 @@
6863 |-
5632 |-
6864 ?~ ds &
5633 ?~ ds &
6865 ?: ?=(%mold -.i.ds) $(ds t.ds)
5634 ?: ?=(%mold -.i.ds) $(ds t.ds)
6866− ?: =(name.i.ds %proj) |
6867 ?. (unique-value-name name.i.ds names) |
5635 ?. (unique-value-name name.i.ds names) |
6868 ?: ?=(^ (ienv-lookup name.i.ds env)) |
5636 ?: ?=(^ (ienv-lookup name.i.ds env)) |
6869 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
5637 ?: (lien globals.state |=(n=term =(n name.i.ds))) |
@@ -6887,7 +5655,6 @@
6887 |-
5655 |-
6888 ?~ locals &
5656 ?~ locals &
6889 =/ n=term name.i.locals
5657 =/ n=term name.i.locals
6890− ?: =(n %proj) |
6891 ?. (unique-value-name n names) |
5658 ?. (unique-value-name n names) |
6892 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
5659 ?: (lien molds.state |=(m=[name=term body=shape] =(n name.m))) |
6893 ?: (lien marks.state |=(m=term =(n m))) |
5660 ?: (lien marks.state |=(m=term =(n m))) |
@@ -6905,145 +5672,6 @@
6905 ?~ inferred |
5672 ?~ inferred |
6906 $(locals t.locals)
5673 $(locals t.locals)
6907::
5674::
6908−:: Gather written capitals belonging to one ++. Nested local definitions
6909−:: establish their own scopes; inline gates remain in the enclosing scope.
6910−+$ icap-site [name=@t at=span]
6911−++ scope-shape
6912− |= s=shape
6913− ^- (list icap-site)
6914− ?- -.s
6915− %tvar ~[[name.s at.s]]
6916− %apply (zing (turn args.s scope-shape))
6917− %cell (zing (turn fields.s scope-field))
6918− %union (zing (turn cases.s scope-shape))
6919− %fn (weld (scope-shape sample.s) (scope-shape product.s))
6920− %generic
6921− =/ inside=(list icap-site) (scope-shape body.s)
6922− (skim inside |=(site=icap-site !(lien vars.s |=(v=@t =(v name.site)))))
6923− * ~
6924− ==
6925−::
6926−++ scope-field
6927− |= f=field
6928− ^- (list icap-site)
6929− ?- -.f
6930− %face (scope-shape shape.f)
6931− %bare (scope-shape shape.f)
6932− %pun ~
6933− ==
6934−::
6935−++ scope-sample
6936− |= s=sample
6937− ^- (list icap-site)
6938− ?- -.s
6939− %face (scope-shape shape.s)
6940− %bare (scope-shape shape.s)
6941− %cell (zing (turn items.s scope-sample))
6942− * ~
6943− ==
6944−::
6945−++ scope-pieces
6946− |= ps=(list piece)
6947− ^- (list icap-site)
6948− ?~ ps ~
6949− =/ first=(list icap-site)
6950− ?- -.i.ps
6951− %expr (scope-expr p.i.ps)
6952− %text ~
6953− ==
6954− (weld first $(ps t.ps))
6955−::
6956−++ scope-qsegs
6957− |= ps=(list qseg)
6958− ^- (list icap-site)
6959− ?~ ps ~
6960− =/ first=(list icap-site)
6961− ?- -.i.ps
6962− %expr (scope-expr p.i.ps)
6963− %knot ~
6964− ==
6965− (weld first $(ps t.ps))
6966−::
6967−++ scope-edits
6968− |= xs=(list edit)
6969− ^- (list icap-site)
6970− ?~ xs ~
6971− =/ first=(list icap-site) (scope-expr val.i.xs)
6972− (weld first $(xs t.xs))
6973−::
6974−++ scope-items
6975− |= xs=(list item)
6976− ^- (list icap-site)
6977− ?~ xs ~
6978− =/ first=(list icap-site) (scope-expr val.i.xs)
6979− (weld first $(xs t.xs))
6980−::
6981−++ scope-arms
6982− |= xs=(list arm)
6983− ^- (list icap-site)
6984− ?~ xs ~
6985− =/ first=(list icap-site) (scope-expr val.i.xs)
6986− (weld first $(xs t.xs))
6987−::
6988−++ scope-exprs
6989− |= xs=(list expr)
6990− ^- (list icap-site)
6991− ?~ xs ~
6992− =/ first=(list icap-site) (scope-expr i.xs)
6993− (weld first $(xs t.xs))
6994−::
6995−++ scope-expr
6996− |= e=expr
6997− ^- (list icap-site)
6998− ?- -.e
6999− %str (scope-pieces pieces.e)
7000− %qath (scope-qsegs segs.e)
7001− %change (scope-edits edits.e)
7002− %pair (scope-expr val.e)
7003− %unit (scope-expr val.e)
7004− %group (scope-expr inner.e)
7005− %list (scope-exprs items.e)
7006− %tuple (scope-items items.e)
7007− %gate
7008− =/ first=(list icap-site) (scope-sample sample.e)
7009− =/ last=(list icap-site) (scope-expr body.e)
7010− (weld first last)
7011− %gate-wide
7012− =/ first=(list icap-site) (scope-sample sample.e)
7013− =/ last=(list icap-site) (scope-expr body.e)
7014− (weld first last)
7015− %call
7016− =/ first=(list icap-site) (scope-expr head.e)
7017− =/ last=(list icap-site) (scope-exprs args.e)
7018− (weld first last)
7019− %cast
7020− =/ first=(list icap-site) (scope-shape shape.e)
7021− =/ last=(list icap-site) (scope-expr val.e)
7022− (weld first last)
7023− %trace
7024− =/ first=(list icap-site) (scope-expr val.e)
7025− =/ last=(list icap-site) (scope-expr then.e)
7026− (weld first last)
7027− %branch
7028− =/ first=(list icap-site) (scope-expr subject.e)
7029− =/ last=(list icap-site) (scope-arms arms.e)
7030− (weld first last)
7031− %body (scope-expr final.e)
7032− * ~
7033− ==
7034−::
7035−++ reserve-cap-sites
7036− |= [sites=(list icap-site) state=istate]
7037− ^- istate
7038− ?~ sites state
7039− ?: ?=(^ (icap-lookup name.i.sites caps.state)) $(sites t.sites)
7040− $(sites t.sites, state state(next +(next.state), caps [[name.i.sites next.state at.i.sites] caps.state]))
7041−::
7042−++ reserve-def-caps
7043− |= [e=expr state=istate]
7044− ^- istate
7045− (reserve-cap-sites (scope-expr e) state)
7046−::
7047++ infer-local-defs
5675++ infer-local-defs
7048 |= [ds=(list def) env=ienv state=istate]
5676 |= [ds=(list def) env=ienv state=istate]
7049 ^- ilocal-result
5677 ^- ilocal-result
@@ -7052,66 +5680,26 @@
7052 |-
5680 |-
7053 ?~ ds
5681 ?~ ds
7054 ?~ remaining [%& env state]
5682 ?~ remaining [%& env state]
7055− ?. progressed
7056− =/ pending=(list def) (flop remaining)
7057− =/ groups=icomponents (graph-components pending (global-value-names pending))
7058− =/ grouped=(unit [rest=(list def) env=ienv state=istate])
7059− (try-local-group pending groups env state)
7060− ?~ grouped [%| ["local definitions need unsupported inference" ~]]
5683+ ?. progressed [%| ["local definitions need unsupported inference" ~]]
7061− $(ds rest.u.grouped, remaining ~, env env.u.grouped, state state.u.grouped, progressed |)
7062 $(ds (flop remaining), remaining ~, progressed |)
5684 $(ds (flop remaining), remaining ~, progressed |)
7063 =/ d=def i.ds
5685 =/ d=def i.ds
7064 ?> ?=(%value -.d)
5686 ?> ?=(%value -.d)
7065− =/ local-state=istate (reserve-def-caps val.d state)
7066− =/ inferred=iresult (infer-fragment val.d env local-state)
5687+ =/ inferred=iresult (infer-fragment val.d env state)
7067− =/ retried=? ?=(%| -.inferred)
7068− =? inferred retried (infer-recursive-gate d env local-state)
7069 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
5688 ?: ?=(%| -.inferred) $(ds t.ds, remaining [d remaining])
7070− =. state.p.inferred (promote-restricted-numbers state.p.inferred env)
7071− =. state.p.inferred (default-hole-numbers holes.state.p.inferred holes.state state.p.inferred env !(itype-has-gate (itype-normalize typ.p.inferred sub.state.p.inferred)))
7072− =/ hole=(unit idiag) (unresolved-hole holes.state.p.inferred holes.state state.p.inferred)
7073− ?^ hole [%| u.hole]
7074− =/ merged=(unit [first=icap second=icap])
7075− (merged-capitals caps.state.p.inferred sub.state.p.inferred)
7076− ?^ merged
7077− [%| ["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"]]]]
7078− ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred)
7079− [%| ["explicit capital constraints are not supported by partial inference" ~]]
7080 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
5689 =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
7081 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
5690 ?: |((pending-tags tags.state.p.inferred sub.state.p.inferred) (itype-has-tag typ))
7082 $(ds t.ds, remaining [d remaining])
5691 $(ds t.ds, remaining [d remaining])
7083 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
5692 ?: (unsupported-atom-vars typ caps.state.p.inferred binders.state.p.inferred sub.state.p.inferred)
7084 $(ds t.ds, remaining [d remaining])
5693 $(ds t.ds, remaining [d remaining])
7085 =/ free=(list @ud)
5694 =/ free=(list @ud)
7086− (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state sub.state.p.inferred))
5695+ (weld (free-env-vars env sub.state.p.inferred) (free-cap-vars caps.state.p.inferred sub.state.p.inferred))
7087 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
5696 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
7088 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
5697 =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
7089− $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred(caps caps.state, holes holes.state), progressed &)
5698+ $(ds t.ds, env [[name.d [typ vars]] env], state state.p.inferred, progressed &)
7090−::
7091−:: Try complete cyclic local groups after individual definitions stall.
7092−:: Components with non-gates or unresolved constraints stay unavailable.
7093−::
7094−++ try-local-group
7095− |= [ds=(list def) groups=icomponents env=ienv state=istate]
7096− ^- (unit [rest=(list def) env=ienv state=istate])
7097− ?~ groups ~
7098− =/ names=(list term) i.groups
7099− ?. (gth (lent names) 1) $(groups t.groups)
7100− =/ members=(list def)
7101− (skim ds |=(d=def &(?=(%value -.d) (lien names |=(n=term =(n name.d))))))
7102− ?. =((lent members) (lent names)) $(groups t.groups)
7103− =/ result=ilocal-result (infer-gate-group members env state)
7104− ?: ?=(%| -.result) $(groups t.groups)
7105− =/ rest=(list def)
7106− (skim ds |=(d=def !(lien names |=(n=term =(n name.d)))))
7107− =/ more=(unit [rest=(list def) env=ienv state=istate])
7108− $(ds rest, groups t.groups, env env.p.result, state state.p.result)
7109− ?^ more more
7110− `[rest env.p.result state.p.result]
7111::
5699::
7112:: Read only fields of a known record. Unresolved field constraints and
5700:: Read only fields of a known record. Unresolved field constraints and
7113−:: ambiguous repeated faces are outside this fragment. Imported record
5701+:: ambiguous repeated faces are outside this fragment (doc question:
7114−:: spines with repeated names are unavailable when used.
5702+:: whether duplicate imported Hoon faces are valid or select a field).
7115::
5703::
7116++ record-fields-named
5704++ record-fields-named
7117 |= [name=term t=itype sub=isub]
5705 |= [name=term t=itype sub=isub]
@@ -7130,909 +5718,22 @@
7130 ^- iresult
5718 ^- iresult
7131 =/ reverse=(list term) (flop names)
5719 =/ reverse=(list term) (flop names)
7132 ?~ reverse [%| ["empty wing" ~]]
5720 ?~ reverse [%| ["empty wing" ~]]
7133− =/ iface=(unit ifile) (find-jibb-interface i.reverse jimports.state)
5721+ =/ scheme=(unit ischeme) (ienv-lookup i.reverse env)
5722+ ?~ scheme [%| ["field access is not supported by partial inference" ~]]
5723+ =/ inst=[typ=itype state=istate] (instantiate-scheme u.scheme state)
7134 =/ fields=(list term) t.reverse
5724 =/ fields=(list term) t.reverse
7135− ?~ fields [%| ["field access is not supported by partial inference" ~]]
7136− =/ scheme=(unit ischeme)
7137− ?~ iface
7138− (ienv-lookup i.reverse env)
7139− (ienv-lookup i.fields values.u.iface)
7140− ?~ scheme
7141− ?^ iface [%| ["module member is not available to partial inference" ~]]
7142− [%| ["field access is not supported by partial inference" ~]]
7143− =/ inst=[typ=itype state=istate]
7144− ?~ iface (instantiate-scheme u.scheme state)
7145− =/ imported=ischeme u.scheme
7146− =. typ.imported (itype-in-import typ.imported u.iface i.reverse prelude.state)
7147− (instantiate-scheme imported state)
7148− =/ remaining=(list term) ?~(iface fields t.fields)
7149 =/ typ=itype typ.inst
5725 =/ typ=itype typ.inst
7150 |-
5726 |-
7151− ?~ remaining [%& typ state.inst]
5727+ ?~ fields [%& typ state.inst]
7152− =/ found=(list itype) (record-fields-named i.remaining typ sub.state.inst)
5728+ =/ found=(list itype) (record-fields-named i.fields typ sub.state.inst)
7153 ?~ found [%| ["field is not available to partial inference" ~]]
5729 ?~ found [%| ["field is not available to partial inference" ~]]
7154 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
5730 ?^ t.found [%| ["field name is ambiguous in partial inference" ~]]
7155− $(remaining t.remaining, typ i.found)
5731+ $(fields t.fields, typ i.found)
7156−::
7157−:: Propagate a known union or list through supported loobean, unit and list
7158−:: branches. Empty bodies and groups are transparent; bodies with definitions
7159−:: keep their normal scoping and wait for general bidirectional inference.
7160−::
7161−++ context-union-branch
7162− |= e=expr
7163− ^- ?
7164− ?- -.e
7165− %branch &
7166− %group $(e inner.e)
7167− %body ?~(defs.e $(e final.e) |)
7168− * |
7169− ==
7170−::
7171−++ infer-union-context
7172− |= [e=expr expected=itype env=ienv state=istate context=span]
7173− ^- iresult
7174− ?: ?=(%group -.e) $(e inner.e)
7175− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
7176− ?: &(?=(%collection -.expected) =(%list name.expected) (context-list-expression e))
7177− (infer-list-context e expected env state context)
7178− ?: ?=(%branch -.e)
7179− ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
7180− ?~ t.arms.e [%| ["branch pattern is not supported by partial inference" ~]]
7181− ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
7182− =/ x=arm i.arms.e
7183− =/ y=arm i.t.arms.e
7184− ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
7185− (infer-unit-branch e env state `[expected context])
7186− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y))
7187− [%| ["branch pattern is not supported by partial inference" ~]]
7188− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
7189− [%| ["branch pattern is not supported by partial inference" ~]]
7190− ?: =(val.lit.pat.x val.lit.pat.y)
7191− [%| ["branch does not cover both loobeans" ~]]
7192− =/ subject=iresult (infer-fragment subject.e env state)
7193− ?: ?=(%| -.subject) subject
7194− =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
7195− ?: ?=(%union -.subject-type)
7196− [%| ["contextual union-pattern branch is not supported by partial inference" ~]]
7197− =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
7198− ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
7199− =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
7200− ?: ?=(%| -.left) left
7201− =/ right=iresult $(e val.y, state state.p.left)
7202− ?: ?=(%| -.right) right
7203− [%& expected state.p.right]
7204− =/ value=iresult (infer-fragment e env state)
7205− ?: ?=(%| -.value) value
7206− =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7207− ?: ?=(%unknown -.fit)
7208− ?: &(?=(%collection -.expected) =(%list name.expected))
7209− [%| ["branch list constraint is not supported by partial inference" ~]]
7210− ?: ?=(%flag -.expected) [%| ["branch loobean constraint is not supported by partial inference" ~]]
7211− [%| ["branch union constraint is not supported by partial inference" ~]]
7212− ?: ?=(%bad -.fit)
7213− =/ missing=(unit idiag) (missing-union-tag e expected sub.state.p.value context)
7214− ?^ missing [%| u.missing]
7215− =/ nested=(unit idiag) (nested-missing-tag e typ.p.value expected sub.state.p.value next.state.p.value context)
7216− ?^ nested [%| u.nested]
7217− ?: &(?=(%collection -.expected) =(%list name.expected))
7218− [%| ["branch arm does not fit its expected list" ~[[context "expected list"] [(span-of e) "branch arm"]]]]
7219− ?: ?=(%flag -.expected)
7220− [%| ["branch arm does not fit its expected loobean" ~[[context "expected loobean"] [(span-of e) "branch arm"]]]]
7221− [%| ["branch arm does not fit its expected union" ~[[context "expected union"] [(span-of e) "branch arm"]]]]
7222− [%& expected state.p.value(sub sub.fit, next next.fit)]
7223−::
7224−:: A list expression needs a known list target and the validated prelude list.
7225−:: Literal items and unfaced two-item cons cells receive that target one by
7226−:: one; pending constraints elsewhere stay in the threaded state.
7227−::
7228−++ context-list-expression
7229− |= e=expr
7230− ^- ?
7231− ?- -.e
7232− %list &
7233− %tuple &
7234− %lit |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
7235− %group $(e inner.e)
7236− %body ?~(defs.e $(e final.e) |)
7237− * |
7238− ==
7239−::
7240−++ infer-list-context
7241− |= [e=expr expected=itype env=ienv state=istate context=span]
7242− ^- iresult
7243− ?: ?=(%group -.e) $(e inner.e)
7244− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
7245− ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
7246− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7247− [%| ["list literal needs the standard prelude in partial inference" ~]]
7248− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
7249− ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
7250− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
7251− [%| ["list literal needs the standard prelude in partial inference" ~]]
7252− =/ target=itype (itype-walk expected sub.state)
7253− ?. ?=(%collection -.target) [%| ["list context is not supported by partial inference" ~]]
7254− ?. =(%list name.target) [%| ["list context is not supported by partial inference" ~]]
7255− ?~ args.target [%| ["list context is not supported by partial inference" ~]]
7256− ?^ t.args.target [%| ["list context is not supported by partial inference" ~]]
7257− ?: ?=(%lit -.e)
7258− ?. |(=(%null form.lit.e) &(=(%term form.lit.e) =(0 val.lit.e)))
7259− [%| ["list expression is not supported by partial inference" ~]]
7260− [%& target state]
7261− ?: ?=(%list -.e)
7262− =/ result=iresult (infer-list-items items.e i.args.target env state context)
7263− ?: ?=(%| -.result) result
7264− [%& target state.p.result]
7265− ?. ?=(%tuple -.e) [%| ["list expression is not supported by partial inference" ~]]
7266− ?~ items.e [%| ["cons shape is not supported by partial inference" ~]]
7267− ?~ t.items.e [%| ["cons shape is not supported by partial inference" ~]]
7268− ?^ t.t.items.e [%| ["cons shape is not supported by partial inference" ~]]
7269− ?^ face.i.items.e [%| ["faced cons is not supported by partial inference" ~]]
7270− ?^ face.i.t.items.e [%| ["faced cons is not supported by partial inference" ~]]
7271− =/ head=iresult (infer-list-items ~[val.i.items.e] i.args.target env state context)
7272− ?: ?=(%| -.head) head
7273− =/ target=itype (itype-walk target sub.state.p.head)
7274− =/ tail=iresult
7275− ?: (context-list-expression val.i.t.items.e)
7276− (infer-list-context val.i.t.items.e target env state.p.head context)
7277− (infer-fragment val.i.t.items.e env state.p.head)
7278− ?: ?=(%| -.tail) tail
7279− =/ fit=ifit (itype-fit typ.p.tail target sub.state.p.tail next.state.p.tail)
7280− ?: ?=(%unknown -.fit) [%| ["list tail constraint is not supported by partial inference" ~]]
7281− ?: ?=(%bad -.fit)
7282− [%| ["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)]]]]
7283− [%& target state.p.tail(sub sub.fit, next next.fit)]
7284−::
7285−++ infer-open-list-items
7286− |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7287− ^- iresult
7288− ?~ items [%& expected state]
7289− =/ target=itype (itype-walk expected sub.state)
7290− =/ value=iresult (infer-call-context-arg i.items target env state context)
7291− ?: ?=(%| -.value) value
7292− =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7293− ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
7294− ?: ?=(%bad -.fit)
7295− ?: |((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))
7296− [%| ["list item widening is not supported by partial inference" ~]]
7297− [%| ["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)]]]]
7298− ?: (itype-has-tag (itype-normalize expected sub.fit))
7299− [%| ["list item needs context in partial inference" ~]]
7300− $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7301−::
7302−++ infer-list-items
7303− |= [items=(list expr) expected=itype env=ienv state=istate context=span]
7304− ^- iresult
7305− ?~ items [%& expected state]
7306− =/ target=itype (itype-walk expected sub.state)
7307− =/ value=iresult (infer-call-context-arg i.items target env state context)
7308− ?: ?=(%| -.value) value
7309− =/ fit=ifit (itype-fit typ.p.value target sub.state.p.value next.state.p.value)
7310− ?: ?=(%unknown -.fit) [%| ["list item constraint is not supported by partial inference" ~]]
7311− ?: ?=(%bad -.fit)
7312− =/ missing=(unit idiag) (missing-union-tag i.items target sub.state.p.value context)
7313− ?^ missing [%| u.missing]
7314− =/ nested=(unit idiag) (nested-missing-tag i.items typ.p.value target sub.state.p.value next.state.p.value context)
7315− ?^ nested [%| u.nested]
7316− [%| ["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)]]]]
7317− $(items t.items, state state.p.value(sub sub.fit, next next.fit))
7318−::
7319−:: The supported unit pattern covers exactly an atom zero and a cell
7320−:: headed by zero, with a single binder for its payload. Unresolved
7321−:: subjects and all other pattern matrices stay outside this fragment.
7322−::
7323−++ unit-empty-pattern
7324− |= p=pattern
7325− ^- ?
7326− ?. ?=(%lit -.p) |
7327− =(%null form.lit.p)
7328−::
7329−++ unit-payload-pattern
7330− |= p=pattern
7331− ^- (unit term)
7332− ?. ?=(%cell -.p) ~
7333− ?~ items.p ~
7334− ?~ t.items.p ~
7335− ?^ t.t.items.p ~
7336− ?. (unit-empty-pattern i.items.p) ~
7337− ?. ?=(%bind -.i.t.items.p) ~
7338− `name.i.t.items.p
7339−::
7340−++ unit-empty-case
7341− |= t=itype
7342− ^- ?
7343− ?. ?=(%const -.t) |
7344− =(0 val.literal.t)
7345−::
7346−++ unit-payload-case
7347− |= t=itype
7348− ^- (unit itype)
7349− ?. ?=(%cell -.t) ~
7350− ?. (unit-empty-case hed.t) ~
7351− =/ payload=itype tal.t
7352− =? payload ?=(%face -.payload) body.payload
7353− `payload
7354−::
7355−++ unit-union-payload
7356− |= t=itype
7357− ^- (unit itype)
7358− ?. ?=(%union -.t) ~
7359− ?~ cases.t ~
7360− ?~ t.cases.t ~
7361− ?^ t.t.cases.t ~
7362− ?: (unit-empty-case i.cases.t) (unit-payload-case i.t.cases.t)
7363− ?: (unit-empty-case i.t.cases.t) (unit-payload-case i.cases.t)
7364− ~
7365−::
7366−:: List matching currently covers exactly null and a cell of two binders.
7367−:: The head has the element type and the tail has the whole list type.
7368−:: Other patterns and lists whose element mold is empty remain unsupported.
7369−::
7370−++ list-payload-pattern
7371− |= p=pattern
7372− ^- (unit [head=term tail=term])
7373− ?. ?=(%cell -.p) ~
7374− ?~ items.p ~
7375− ?~ t.items.p ~
7376− ?^ t.t.items.p ~
7377− ?. ?=(%bind -.i.items.p) ~
7378− ?. ?=(%bind -.i.t.items.p) ~
7379− `[name.i.items.p name.i.t.items.p]
7380−::
7381−++ infer-list-branch
7382− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span]) typ=itype]
7383− ^- iresult
7384− ?> ?=(%branch -.e)
7385− ?> ?=(%collection -.typ)
7386− ?. =(%list name.typ) [%| ["list pattern is not supported by partial inference" ~]]
7387− ?~ prelude.state [%| ["list pattern needs the standard prelude in partial inference" ~]]
7388− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
7389− [%| ["list pattern needs the standard prelude in partial inference" ~]]
7390− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
7391− ?~ standard [%| ["list pattern needs the standard prelude in partial inference" ~]]
7392− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
7393− [%| ["list pattern needs the standard prelude in partial inference" ~]]
7394− ?~ args.typ [%| ["list pattern is not supported by partial inference" ~]]
7395− ?^ t.args.typ [%| ["list pattern is not supported by partial inference" ~]]
7396− ?~ arms.e [%| ["list branch is not supported by partial inference" ~]]
7397− ?~ t.arms.e [%| ["list branch is not supported by partial inference" ~]]
7398− ?^ t.t.arms.e [%| ["list branch is not supported by partial inference" ~]]
7399− =/ x=arm i.arms.e
7400− =/ y=arm i.t.arms.e
7401− =/ first-empty=? (unit-empty-pattern pat.x)
7402− =/ first-name=(unit [head=term tail=term]) (list-payload-pattern pat.x)
7403− =/ second-name=(unit [head=term tail=term]) (list-payload-pattern pat.y)
7404− ?. |(&(first-empty ?=(^ second-name)) &((unit-empty-pattern pat.y) ?=(^ first-name)))
7405− [%| ["list branch pattern is not supported by partial inference" ~]]
7406− =/ binder=(unit [head=term tail=term]) ?:(first-empty second-name first-name)
7407− ?~ binder [%| ["list branch pattern is not supported by partial inference" ~]]
7408− ?: |(=(head.u.binder %proj) =(tail.u.binder %proj) =(head.u.binder tail.u.binder) ?=(^ (ienv-lookup head.u.binder env)) ?=(^ (ienv-lookup tail.u.binder env)) (lien globals.state |=(n=term |(=(n head.u.binder) =(n tail.u.binder)))))
7409− [%| ["pattern binder shadows a name" ~]]
7410− =/ extended=ienv [[head.u.binder [i.args.typ ~]] [tail.u.binder [typ ~]] env]
7411− =/ left=iresult
7412− ?~ expected (infer-fragment val.x ?:(first-empty env extended) state)
7413− (infer-union-context val.x typ.u.expected ?:(first-empty env extended) state context.u.expected)
7414− ?: ?=(%| -.left) left
7415− =/ right=iresult
7416− ?~ expected (infer-fragment val.y ?:(first-empty extended env) state.p.left)
7417− (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
7418− ?: ?=(%| -.right) right
7419− ?^ expected [%& typ.u.expected state.p.right]
7420− =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
7421− ?~ joined [%| ["list branch results need unsupported inference" ~]]
7422− [%& typ.p.left state.p.right(sub u.joined)]
7423−::
7424−++ infer-unit-branch
7425− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7426− ^- iresult
7427− ?> ?=(%branch -.e)
7428− ?~ arms.e [%| ["unit branch is not supported by partial inference" ~]]
7429− ?~ t.arms.e [%| ["unit branch is not supported by partial inference" ~]]
7430− ?^ t.t.arms.e [%| ["unit branch is not supported by partial inference" ~]]
7431− =/ subject=iresult (infer-fragment subject.e env state)
7432− ?: ?=(%| -.subject) subject
7433− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7434− ?: &(?=(%collection -.typ) =(%list name.typ))
7435− (infer-list-branch e env state.p.subject expected typ)
7436− =/ x=arm i.arms.e
7437− =/ y=arm i.t.arms.e
7438− =/ first-empty=? (unit-empty-pattern pat.x)
7439− =/ first-name=(unit term) (unit-payload-pattern pat.x)
7440− =/ second-name=(unit term) (unit-payload-pattern pat.y)
7441− ?. |(&(first-empty ?=(^ second-name)) &((unit-empty-pattern pat.y) ?=(^ first-name)))
7442− [%| ["unit branch pattern is not supported by partial inference" ~]]
7443− =/ binder=(unit term) ?:(first-empty second-name first-name)
7444− ?~ binder [%| ["unit branch pattern is not supported by partial inference" ~]]
7445− ?: |(=(u.binder %proj) ?=(^ (ienv-lookup u.binder env)) (lien globals.state |=(n=term =(n u.binder))))
7446− [%| ["pattern binder shadows a name" ~]]
7447− =/ payload=(unit itype) (unit-union-payload typ)
7448− ?~ payload [%| ["unit branch subject is not supported by partial inference" ~]]
7449− =/ extended=ienv [[u.binder [u.payload ~]] env]
7450− =/ left=iresult
7451− ?~ expected (infer-fragment val.x ?:(first-empty env extended) state.p.subject)
7452− (infer-union-context val.x typ.u.expected ?:(first-empty env extended) state.p.subject context.u.expected)
7453− ?: ?=(%| -.left) left
7454− =/ right=iresult
7455− ?~ expected (infer-fragment val.y ?:(first-empty extended env) state.p.left)
7456− (infer-union-context val.y typ.u.expected ?:(first-empty extended env) state.p.left context.u.expected)
7457− ?: ?=(%| -.right) right
7458− ?^ expected [%& typ.u.expected state.p.right]
7459− =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
7460− ?~ joined [%| ["unit branch results need unsupported inference" ~]]
7461− [%& typ.p.left state.p.right(sub u.joined)]
7462−::
7463−:: Infer pieces in order, retaining their substitutions and pending tags.
7464−:: A bare decimal literal has no outside type constraint, so it takes its
7465−:: normal @ud default here. Other open numeric and aura variables wait for
7466−:: deferred constraints, which this fragment does not implement yet.
7467−++ infer-string-pieces
7468− |= [ps=(list piece) env=ienv state=istate]
7469− ^- iresult
7470− ?~ ps [%& [%atom %t] state]
7471− ?: ?=(%text -.i.ps) $(ps t.ps)
7472− =/ item=iresult (infer-fragment p.i.ps env state)
7473− ?: ?=(%| -.item) item
7474− =/ t=itype (itype-normalize typ.p.item sub.state.p.item)
7475− ?: |(?=(%atom -.t) ?=(%any-atom -.t))
7476− $(ps t.ps, state state.p.item)
7477− ?: &(|(?=(%nvar -.t) ?=(%rnvar -.t)) ?=(%lit -.p.i.ps) =(%number form.lit.p.i.ps))
7478− $(ps t.ps, state state.p.item)
7479− ?: &(?=(%collection -.t) =(%list name.t) =(~[[%atom 'tD']] args.t))
7480− $(ps t.ps, state state.p.item)
7481− ?: &(?=(%avar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7482− [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7483− ?: &(?=(%rvar -.t) (atom-var-from-cap id.t caps.state.p.item sub.state.p.item))
7484− [%| ["a generic atom in interpolation needs an aura" ~[[(span-of p.i.ps) "atom with a generic aura"]]]]
7485− ?: ?=(%cell -.t)
7486− [%| ["a cell in interpolation needs a printer" ~[[(span-of p.i.ps) "cell without a printer"]]]]
7487− [%| ["interpolation type needs unsupported inference" ~]]
7488−::
7489−:: Whole-case coverage for a known union. When a pattern may cover only
7490−:: part of a case, finite loobean refinements are tried below; other
7491−:: partial coverage stays unsupported until the general pattern matrix.
7492−+$ imatch ?(%full %none %unknown)
7493−++ union-pattern-items
7494− |= [ps=(list pattern) t=itype]
7495− ^- imatch
7496− ?~ ps %unknown
7497− ?~ t.ps (union-pattern i.ps t)
7498− =. t ?:(?=(%face -.t) body.t t)
7499− ?. ?=(%cell -.t)
7500− ?: |(?=(%atom -.t) ?=(%any-atom -.t) ?=(%flag -.t) ?=(%const -.t)) %none
7501− %unknown
7502− =/ a=imatch (union-pattern i.ps hed.t)
7503− =/ b=imatch $(ps t.ps, t tal.t)
7504− ?: |(=(%none a) =(%none b)) %none
7505− ?:(&(=(%full a) =(%full b)) %full %unknown)
7506−::
7507−++ union-pattern
7508− |= [p=pattern t=itype]
7509− ^- imatch
7510− =. t ?:(?=(%face -.t) body.t t)
7511− ?- -.p
7512− %any %full
7513− %bind %full
7514− %lit
7515− ?: ?=(%const -.t) ?:(=(val.literal.t val.lit.p) %full %none)
7516− ?: ?=(%cell -.t) %none
7517− ?: ?=(%flag -.t)
7518− ?:(|(=(0 val.lit.p) =(1 val.lit.p)) %unknown %none)
7519− %unknown
7520− %str ?:(?=(%cell -.t) %none %unknown)
7521− %cell (union-pattern-items items.p t)
7522− ==
7523−::
7524−++ union-pattern-has-bind
7525− |= p=pattern
7526− ^- ?
7527− ?: ?=(%bind -.p) &
7528− ?. ?=(%cell -.p) |
7529− (lien items.p union-pattern-has-bind)
7530−::
7531−++ union-pattern-bind-items
7532− |= [ps=(list pattern) t=itype env=ienv globals=(list term)]
7533− ^- (unit ienv)
7534− ?~ ps ~
7535− ?~ t.ps (union-pattern-bind i.ps t env globals)
7536− =. t ?:(?=(%face -.t) body.t t)
7537− ?. ?=(%cell -.t) ~
7538− =/ first=(unit ienv) (union-pattern-bind i.ps hed.t env globals)
7539− ?~ first ~
7540− $(ps t.ps, t tal.t, env u.first)
7541−::
7542−++ union-pattern-bind
7543− |= [p=pattern t=itype env=ienv globals=(list term)]
7544− ^- (unit ienv)
7545− =. t ?:(?=(%face -.t) body.t t)
7546− ?: ?=(%bind -.p)
7547− ?: |(=(name.p %proj) ?=(^ (ienv-lookup name.p env)) (lien globals |=(n=term =(n name.p)))) ~
7548− `[[name.p [t ~]] env]
7549− ?: ?=(%cell -.p) (union-pattern-bind-items items.p t env globals)
7550− `env
7551−::
7552−:: Split loobean fields into finite refinements for partial patterns.
7553−:: Keep original cases for binder types and preserve whole-case matching
7554−:: before trying refinements. Cap products at 64; unknown, empty or opaque
7555−:: shapes stay unsupported rather than implying complete pattern checking.
7556−+$ ifinite [origin=@ud base=itype part=itype]
7557−++ finite-product
7558− |= [hs=(list itype) ts=(list itype) out=(list itype)]
7559− ^- (list itype)
7560− ?~ hs out
7561− =/ rows=(list itype) (turn ts |=(t=itype [%cell i.hs t]))
7562− $(hs t.hs, out (weld rows out))
7563−::
7564−++ finite-type
7565− |= t=itype
7566− ^- (unit (list itype))
7567− ?- -.t
7568− %flag
7569− `~[[%const [%loobean %f 0 '%.y']] [%const [%loobean %f 1 '%.n']]]
7570− %face
7571− =/ body=(unit (list itype)) $(t body.t)
7572− ?~ body ~
7573− `(turn u.body |=(x=itype [%face name.t x]))
7574− %cell
7575− =/ hed=(unit (list itype)) $(t hed.t)
7576− ?~ hed ~
7577− =/ tal=(unit (list itype)) $(t tal.t)
7578− ?~ tal ~
7579− ?: (gth (mul (lent u.hed) (lent u.tal)) 64) ~
7580− `(finite-product u.hed u.tal ~)
7581− * `~[t]
7582− ==
7583−::
7584−++ finite-cases
7585− |= [xs=(list itype) out=(list ifinite) origin=@ud]
7586− ^- (unit (list ifinite))
7587− ?~ xs `out
7588− =/ parts=(unit (list itype)) (finite-type i.xs)
7589− ?~ parts ~
7590− ?: (gth (add (lent out) (lent u.parts)) 64) ~
7591− =/ rows=(list ifinite) (turn u.parts |=(t=itype [origin i.xs t]))
7592− $(xs t.xs, out (weld out rows), origin +(origin))
7593−::
7594−++ infer-known-union-whole
7595− |= [e=expr env=ienv subject=iresult]
7596− ^- (unit iresult)
7597− ?> ?=(%branch -.e)
7598− ?: ?=(%| -.subject) `subject
7599− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7600− ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7601− =/ cases=(list itype) cases.typ
7602− =/ remaining=(list itype) cases
7603− =/ arms=(list arm) arms.e
7604− =/ st=istate state.p.subject
7605− =/ answer=(unit itype) ~
7606− |-
7607− ?~ arms
7608− ?^ remaining
7609− `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7610− ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7611− `[%& u.answer st]
7612− =/ a=arm i.arms
7613− ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7614− ~
7615− =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7616− ?~ matching
7617− ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7618− `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7619− `[%| ["union pattern is not supported by partial inference" ~]]
7620− ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7621− `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7622− =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7623− ?~ bound `[%| ["pattern binder shadows a name" ~]]
7624− =/ body=iresult (infer-fragment val.a u.bound st)
7625− ?: ?=(%| -.body) `body
7626− =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7627− =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7628− ?: mismatch `[%| ["union branch result matching needs unsupported inference" ~]]
7629− $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body, answer `result)
7630−::
7631−++ infer-known-union-context-whole
7632− |= [e=expr expected=itype env=ienv subject=iresult context=span]
7633− ^- (unit iresult)
7634− ?> ?=(%branch -.e)
7635− ?: ?=(%| -.subject) `subject
7636− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7637− ?. ?=(%union -.typ) `[%| ["branch is not supported by partial inference" ~]]
7638− =/ cases=(list itype) cases.typ
7639− =/ remaining=(list itype) cases
7640− =/ arms=(list arm) arms.e
7641− =/ st=istate state.p.subject
7642− =/ answer=(unit itype) ~
7643− |-
7644− ?~ arms
7645− ?^ remaining
7646− `[%| ["missing union case {(show-itype i.remaining sub.st)}" ~]]
7647− ?~ answer `[%| ["empty union branch is not supported by partial inference" ~]]
7648− `[%& expected st]
7649− =/ a=arm i.arms
7650− ?: (lien remaining |=(c=itype =(%unknown (union-pattern pat.a c))))
7651− ~
7652− =/ matching=(list itype) (skim remaining |=(c=itype =(%full (union-pattern pat.a c))))
7653− ?~ matching
7654− ?: (lien cases |=(c=itype =(%full (union-pattern pat.a c))))
7655− `[%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7656− `[%| ["union pattern is not supported by partial inference" ~]]
7657− ?: &(?=(^ t.matching) (union-pattern-has-bind pat.a))
7658− `[%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7659− =/ bound=(unit ienv) (union-pattern-bind pat.a i.matching env globals.st)
7660− ?~ bound `[%| ["pattern binder shadows a name" ~]]
7661− =/ body=iresult (infer-call-context-arg val.a expected u.bound st context)
7662− ?: ?=(%| -.body) `body
7663− =/ fit=ifit (itype-fit typ.p.body expected sub.state.p.body next.state.p.body)
7664− ?: ?=(%unknown -.fit) `[%| ["union branch result constraint is not supported by partial inference" ~]]
7665− ?: ?=(%bad -.fit)
7666− =/ missing=(unit idiag) (missing-union-tag val.a expected sub.state.p.body context)
7667− ?^ missing `[%| u.missing]
7668− =/ nested=(unit idiag) (nested-missing-tag val.a typ.p.body expected sub.state.p.body next.state.p.body context)
7669− ?^ nested `[%| u.nested]
7670− `[%| ["union branch arm does not fit its expected type" ~[[context "expected type"] [(span-of val.a) "branch arm"]]]]
7671− ?: (itype-has-tag (itype-normalize expected sub.fit))
7672− `[%| ["union branch result needs context in partial inference" ~]]
7673− $(arms t.arms, remaining (skim remaining |=(c=itype !=(%full (union-pattern pat.a c)))), st state.p.body(sub sub.fit, next next.fit), answer `expected)
7674−::
7675−++ infer-known-union-finite
7676− |= [e=expr env=ienv subject=iresult expected=(unit [typ=itype context=span])]
7677− ^- iresult
7678− ?> ?=(%branch -.e)
7679− ?: ?=(%| -.subject) subject
7680− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7681− ?. ?=(%union -.typ) [%| ["branch is not supported by partial inference" ~]]
7682− =/ expanded=(unit (list ifinite)) (finite-cases cases.typ ~ 0)
7683− ?~ expanded [%| ["union pattern expansion needs unsupported inference" ~]]
7684− =/ cases=(list ifinite) u.expanded
7685− =/ remaining=(list ifinite) cases
7686− =/ arms=(list arm) arms.e
7687− =/ st=istate state.p.subject
7688− =/ answer=(unit itype) ~
7689− |-
7690− ?~ arms
7691− ?^ remaining
7692− [%| ["missing union case {(show-itype part.i.remaining sub.st)}" ~]]
7693− ?~ answer [%| ["empty union branch is not supported by partial inference" ~]]
7694− ?~ expected [%& u.answer st]
7695− [%& typ.u.expected st]
7696− =/ a=arm i.arms
7697− ?: (lien remaining |=(c=ifinite =(%unknown (union-pattern pat.a part.c))))
7698− [%| ["partial union pattern is not supported by partial inference" ~]]
7699− =/ matching=(list ifinite) (skim remaining |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7700− ?~ matching
7701− ?: (lien cases |=(c=ifinite =(%full (union-pattern pat.a part.c))))
7702− [%| ["branch arm is covered by earlier arms" ~[[at.pat.a "covered arm"]]]]
7703− [%| ["union pattern is not supported by partial inference" ~]]
7704− ?: &((union-pattern-has-bind pat.a) (lien t.matching |=(c=ifinite !=(origin.c origin.i.matching))))
7705− [%| ["a union pattern binding several cases is not supported by partial inference" ~]]
7706− =/ bound=(unit ienv) (union-pattern-bind pat.a base.i.matching env globals.st)
7707− ?~ bound [%| ["pattern binder shadows a name" ~]]
7708− =/ body=iresult
7709− ?~ expected (infer-fragment val.a u.bound st)
7710− (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7711− ?: ?=(%| -.body) body
7712− ?^ expected
7713− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7714− ?: ?=(%unknown -.fit) [%| ["union branch result constraint is not supported by partial inference" ~]]
7715− ?: ?=(%bad -.fit)
7716− =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7717− ?^ missing [%| u.missing]
7718− =/ 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)
7719− ?^ nested [%| u.nested]
7720− [%| ["union branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7721− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7722− [%| ["union branch result needs context in partial inference" ~]]
7723− $(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)
7724− =/ result=itype (itype-normalize typ.p.body sub.state.p.body)
7725− =/ mismatch=? ?~(answer | !=((itype-normalize u.answer sub.state.p.body) result))
7726− ?: mismatch [%| ["union branch result matching needs unsupported inference" ~]]
7727− $(arms t.arms, remaining (skim remaining |=(c=ifinite !=(%full (union-pattern pat.a part.c)))), st state.p.body, answer `result)
7728−::
7729−:: Prove a one-arm record pattern covers a known, non-union subject.
7730−:: Variable or partial matches stay unsupported; binding uses the same
7731−:: scope and original payload types as the existing union matcher.
7732−++ single-structured-pattern
7733− |= e=expr
7734− ^- ?
7735− ?. ?=(%branch -.e) |
7736− ?~ arms.e |
7737− ?^ t.arms.e |
7738− =/ p=pattern pat.i.arms.e
7739− ?. ?=(%cell -.p) |
7740− !(levy items.p |=(x=pattern ?=(%bind -.x)))
7741−::
7742−++ infer-single-case-branch
7743− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
7744− ^- iresult
7745− ?> (single-structured-pattern e)
7746− ?> ?=(%branch -.e)
7747− ?> ?=(^ arms.e)
7748− =/ a=arm i.arms.e
7749− =/ subject=iresult (infer-fragment subject.e env state)
7750− ?: ?=(%| -.subject) subject
7751− =/ st=istate state.p.subject
7752− =/ typ=itype (itype-normalize typ.p.subject sub.st)
7753− ?: ?=(%union -.typ) [%| ["single-case pattern needs unsupported inference" ~]]
7754− ?. =(%full (union-pattern pat.a typ))
7755− [%| ["single-case pattern needs unsupported inference" ~]]
7756− =/ bound=(unit ienv) (union-pattern-bind pat.a typ env globals.st)
7757− ?~ bound [%| ["pattern binder shadows a name" ~]]
7758− ?~ expected (infer-fragment val.a u.bound st)
7759− =/ body=iresult (infer-call-context-arg val.a typ.u.expected u.bound st context.u.expected)
7760− ?: ?=(%| -.body) body
7761− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
7762− ?: ?=(%unknown -.fit) [%| ["single-case branch result constraint is not supported by partial inference" ~]]
7763− ?: ?=(%bad -.fit)
7764− =/ missing=(unit idiag) (missing-union-tag val.a typ.u.expected sub.state.p.body context.u.expected)
7765− ?^ missing [%| u.missing]
7766− =/ 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)
7767− ?^ nested [%| u.nested]
7768− [%| ["single-case branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.a) "branch arm"]]]]
7769− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
7770− [%| ["single-case branch result needs context in partial inference" ~]]
7771− [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
7772−::
7773−:: This view is used only by pattern analysis, never exported or bound as
7774−:: the subject. Only null plus a two-binder/wildcard cell is supported; its
7775−:: tail keeps the original recursive type. Other patterns fail closed.
7776−++ jrec-match-view
7777− |= [e=expr subject=iresult]
7778− ^- iresult
7779− ?: ?=(%| -.subject) subject
7780− ?. ?=(%branch -.e) subject
7781− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7782− ?. ?=(%jrec -.typ) subject
7783− ?~ arms.e subject
7784− ?~ t.arms.e subject
7785− ?^ t.t.arms.e subject
7786− =/ x=pattern pat.i.arms.e
7787− =/ y=pattern pat.i.t.arms.e
7788− =/ empty=? &(?=(%lit -.x) =(%null form.lit.x))
7789− =/ full=pattern ?:(empty y x)
7790− ?. |(empty &(?=(%lit -.y) =(%null form.lit.y))) subject
7791− ?. ?=(%cell -.full) subject
7792− ?~ items.full subject
7793− ?~ t.items.full subject
7794− ?^ t.t.items.full subject
7795− ?. |(?=(%bind -.i.items.full) ?=(%any -.i.items.full)) subject
7796− ?. |(?=(%bind -.i.t.items.full) ?=(%any -.i.t.items.full)) subject
7797− ?: =(0 jrec-fuel.state.p.subject)
7798− [%| ["recursive mold unfolding needs unsupported inference" ~]]
7799− =/ nil=itype [%const [%null %n 0 '~']]
7800− =/ cell=itype [%cell [%face head.typ [%atom aura.typ]] [%face tail.typ typ]]
7801− [%& [%union ~[nil cell] ~ ~ ~] state.p.subject(jrec-fuel (dec jrec-fuel.state.p.subject))]
7802−::
7803−++ infer-known-union-branch-subject
7804− |= [e=expr env=ienv subject=iresult]
7805− ^- iresult
7806− =. subject (jrec-match-view e subject)
7807− =/ whole=(unit iresult) (infer-known-union-whole e env subject)
7808− ?~ whole (infer-known-union-finite e env subject ~)
7809− u.whole
7810−::
7811−++ infer-known-union-branch
7812− |= [e=expr env=ienv state=istate]
7813− ^- iresult
7814− ?> ?=(%branch -.e)
7815− (infer-known-union-branch-subject e env (infer-fragment subject.e env state))
7816−::
7817−++ infer-known-union-context-subject
7818− |= [e=expr expected=itype env=ienv subject=iresult context=span]
7819− ^- iresult
7820− =. subject (jrec-match-view e subject)
7821− =/ whole=(unit iresult) (infer-known-union-context-whole e expected env subject context)
7822− ?~ whole (infer-known-union-finite e env subject `[expected context])
7823− u.whole
7824−::
7825−:: Limit speculative subject inference to wings and shallow calls;
7826−:: grouping is peeled linearly and cannot introduce a nested branch.
7827−++ simple-union-subject-arg
7828− |= e=expr
7829− ^- ?
7830− ?- -.e
7831− %wing &
7832− %lit &
7833− %str !(lien pieces.e |=(p=piece ?=(%expr -.p)))
7834− * |
7835− ==
7836−::
7837−++ safe-union-subject
7838− |= e=expr
7839− ^- ?
7840− ?: ?=(%group -.e) $(e inner.e)
7841− ?: ?=(%wing -.e) &
7842− ?. ?=(%call -.e) |
7843− ?. ?=(%wing -.head.e) |
7844− (levy args.e simple-union-subject-arg)
7845−::
7846−++ duplicate-loobean-arms
7847− |= e=expr
7848− ^- ?
7849− ?. ?=(%branch -.e) |
7850− ?~ arms.e |
7851− ?~ t.arms.e |
7852− ?^ t.t.arms.e |
7853− =/ x=pattern pat.i.arms.e
7854− =/ y=pattern pat.i.t.arms.e
7855− ?. &(?=(%lit -.x) ?=(%lit -.y)) |
7856− ?. &(=(%loobean form.lit.x) =(%loobean form.lit.y)) |
7857− =(val.lit.x val.lit.y)
7858−::
7859−++ union-subject-call
7860− |= e=expr
7861− ^- ?
7862− ?: ?=(%group -.e) $(e inner.e)
7863− ?=(%call -.e)
7864−::
7865−++ known-union-subject
7866− |= [e=expr env=ienv state=istate]
7867− ^- (unit iresult)
7868− ?. (safe-union-subject e) ~
7869− =/ subject=iresult (infer-fragment e env state)
7870− ?: ?=(%| -.subject) ?:((union-subject-call e) `subject ~)
7871− =/ typ=itype (itype-normalize typ.p.subject sub.state.p.subject)
7872− ?. |(?=(%union -.typ) ?=(%jrec -.typ)) ~
7873− `subject
7874−::
7875−::
7876−:: Infer changes only against a fully known record spine. Retain the
7877−:: target type; unknown spines and repeated edits remain unsupported.
7878−++ change-spine-known
7879− |= [t=itype sub=isub]
7880− ^- ?
7881− =. t (itype-walk t sub)
7882− ?: ?=(%face -.t) &
7883− ?. ?=(%cell -.t) |
7884− =/ first=itype (itype-walk hed.t sub)
7885− ?. ?=(%face -.first) |
7886− $(t tal.t)
7887−::
7888−++ infer-change-edits
7889− |= [edits=(list edit) target=itype env=ienv state=istate seen=(list term)]
7890− ^- iresult
7891− ?~ edits [%& target state]
7892− =/ entry=edit i.edits
7893− ?: (lien seen |=(name=term =(name name.entry)))
7894− [%| ["repeated change fields are not supported by partial inference" ~]]
7895− ?. (change-spine-known target sub.state)
7896− [%| ["change target needs a known record in partial inference" ~]]
7897− =/ found=(list itype) (record-fields-named name.entry target sub.state)
7898− ?~ found
7899− [%| ["record has no field `{(trip name.entry)}`" ~[[at.entry "unknown field"]]]]
7900− ?^ t.found [%| ["change field is ambiguous in partial inference" ~]]
7901− =/ expected=itype i.found
7902− =/ value=iresult (infer-call-context-arg val.entry expected env state at.entry)
7903− ?: ?=(%| -.value) value
7904− =/ fit=ifit (itype-fit typ.p.value expected sub.state.p.value next.state.p.value)
7905− ?: ?=(%unknown -.fit) [%| ["change field constraint is not supported by partial inference" ~]]
7906− ?: ?=(%bad -.fit)
7907− [%| ["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)]]]]
7908− $(edits t.edits, state state.p.value(sub sub.fit, next next.fit), seen [name.entry seen])
7909−::
7910−:: Backtick constructs the canonical prelude unit, after checking its
7911−:: prepared template has the standard null and [~ u=A] cases.
7912−++ standard-unit-template
7913− |= [template=ischeme at=path]
7914− ^- ?
7915− ?. =(at /lib/jibb/prelude/jibb) |
7916− ?~ vars.template |
7917− ?^ t.vars.template |
7918− =/ v=@ud i.vars.template
7919− =/ nil=itype [%const [%null %n 0 '~']]
7920− =/ expected=itype
7921− [%union ~[nil [%cell nil [%face %u [%var v]]]] `[at %unit] `%unit ~[[%var v]]]
7922− =(typ.template expected)
7923−::
7924−:: A named missing-case diagnostic needs more than a failed fit: a case
7925−:: with that tag but the wrong payload is not a missing case. Unknown
7926−:: shapes and atom types that accept terms keep the proof conservative.
7927−+$ itag-presence ?(%yes %no %maybe)
7928−++ tag-presence-cases
7929− |= [cases=(list itype) value=@ sub=isub]
7930− ^- itag-presence
7931− ?~ cases %no
7932− =/ first=itag-presence (tag-presence i.cases value sub)
7933− ?: =(%yes first) %yes
7934− =/ rest=itag-presence $(cases t.cases)
7935− ?: =(%yes rest) %yes
7936− ?: |(=(%maybe first) =(%maybe rest)) %maybe
7937− %no
7938−::
7939−++ tag-presence
7940− |= [t=itype value=@ sub=isub]
7941− ^- itag-presence
7942− =. t (itype-walk t sub)
7943− ?- -.t
7944− %const ?:(=(value val.literal.t) %yes %no)
7945− %flag ?:(|(=(value 0) =(value 1)) %yes %no)
7946− %atom ?:(|(=(%tas aura.t) =(%ta aura.t)) %maybe %no)
7947− %face $(t body.t)
7948− %cell
7949− =/ first=itag-presence $(t hed.t)
7950− ?: =(%yes first) %yes
7951− =/ rest=itag-presence $(t tal.t)
7952− ?: =(%yes rest) %yes
7953− ?: |(=(%maybe first) =(%maybe rest)) %maybe
7954− %no
7955− %union (tag-presence-cases cases.t value sub)
7956− * %maybe
7957− ==
7958−::
7959−++ missing-union-tag
7960− |= [e=expr expected=itype sub=isub context=span]
7961− ^- (unit idiag)
7962− ?. ?=(%lit -.e) ~
7963− ?. =(%term form.lit.e) ~
7964− =. expected (itype-walk expected sub)
7965− |-
7966− ?: ?=(%face -.expected) $(expected (itype-walk body.expected sub))
7967− ?. ?=(%union -.expected) ~
7968− ?. =(%no (tag-presence-cases cases.expected val.lit.e sub)) ~
7969− =/ label=tape
7970− ?~ label.expected "union {(show-itype expected sub)}"
7971− (show-itype expected sub)
7972− `["{label} has no case `{(trip txt.lit.e)}`" ~[[context "expected union"] [(span-of e) "tag"]]]
7973−::
7974−:: Locate a missing tag inside a syntactic tuple only by replaying the
7975−:: directional fit in source order. Uncertain or earlier failures stop
7976−:: the walk, preserving the generic diagnostic rather than guessing.
7977−++ nested-missing-tag
7978− |= [e=expr actual=itype expected=itype sub=isub next=@ud context=span]
7979− ^- (unit idiag)
7980− =/ original=[left=itype right=itype] [actual expected]
7981− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
7982− =/ fit=ifit (itype-fit actual expected sub next)
7983− ?. ?=(%bad -.fit) ~
7984− =. actual (itype-walk actual sub)
7985− =. expected (itype-walk expected sub)
7986− ?: &(?=(%face -.actual) ?=(%face -.expected))
7987− ?. =(name.actual name.expected) ~
7988− $(actual body.actual, expected body.expected)
7989− ?: ?=(%face -.actual) $(actual body.actual)
7990− ?: ?=(%face -.expected) $(expected body.expected)
7991− =/ direct=(unit idiag) (missing-union-tag e expected sub context)
7992− ?^ direct direct
7993− ?. ?=(%tuple -.e) ~
7994− (nested-missing-items items.e actual expected sub next context)
7995−::
7996−++ nested-missing-items
7997− |= [items=(list item) actual=itype expected=itype sub=isub next=@ud context=span]
7998− ^- (unit idiag)
7999− ?~ items ~
8000− ?~ t.items (nested-missing-tag val.i.items actual expected sub next context)
8001− =/ original=[left=itype right=itype] [actual expected]
8002− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
8003− =. actual (itype-walk actual sub)
8004− =. expected (itype-walk expected sub)
8005− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8006− =/ first=ifit (itype-fit hed.actual hed.expected sub next)
8007− ?: ?=(%bad -.first)
8008− (nested-missing-tag val.i.items hed.actual hed.expected sub next context)
8009− ?. ?=(%ok -.first) ~
8010− $(items t.items, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8011−::
8012−:: A term-headed pair is the same noun as a two-item cell. Preserve the
8013−:: whole pair span for the synthetic head and the value's own span for
8014−:: the payload; unresolved term constraints follow ordinary cell inference.
8015−++ pair-as-cell
8016− |= e=expr
8017− ^- expr
8018− ?> ?=(%pair -.e)
8019− =/ head=expr [%lit at.e [%term %tas tag.e (crip ['%' (trip tag.e)])]]
8020− [%tuple at.e ~[[at.e ~ head] [(span-of val.e) ~ val.e]]]
8021−::
8022−:: A segment costs one shared step; dynamic segments are not handled yet.
8023−++ qath-static-fuel
8024− |= [segs=(list qseg) fuel=@ud]
8025− ^- (unit @ud)
8026− ?~ segs `fuel
8027− ?: =(0 fuel) ~
8028− ?. ?=(%knot -.i.segs) ~
8029− $(segs t.segs, fuel (dec fuel))
8030::
5732::
8031++ infer-fragment
5733++ infer-fragment
8032 |= [e=expr env=ienv state=istate]
5734 |= [e=expr env=ienv state=istate]
8033 ^- iresult
5735 ^- iresult
8034 ?- -.e
5736 ?- -.e
8035− %pair $(e (pair-as-cell e))
8036 %lit
5737 %lit
8037 ?- form.lit.e
5738 ?- form.lit.e
8038 %number ?: =(%ud aura.lit.e)
5739 %number ?: =(%ud aura.lit.e)
@@ -8043,48 +5744,13 @@
8043 %duration [%& [%atom %dr] state]
5744 %duration [%& [%atom %dr] state]
8044 %knot [%& [%atom %ta] state]
5745 %knot [%& [%atom %ta] state]
8045 %loobean [%& [%flag ~] state]
5746 %loobean [%& [%flag ~] state]
8046− %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
5747+ %term [%& [%tag next.state lit.e |] state(next +(next.state), tags [next.state tags.state])]
8047− %null [%& [%tag next.state lit.e |] state(next +(next.state), tags [[next.state lit.e] tags.state])]
5748+ * [%| ["literal needs contextual inference" ~]]
8048 ==
5749 ==
8049− %unit
5750+ %str
8050− ?~ prelude.state [%| ["unit construction needs the standard prelude in partial inference" ~]]
5751+ =/ interpolated=? (lien pieces.e |=(p=piece ?=(%expr -.p)))
8051− =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
8052− ?~ standard [%| ["unit construction needs the standard prelude in partial inference" ~]]
8053− ?. (standard-unit-template u.standard at.u.prelude.state)
8054− [%| ["unit construction needs the standard prelude in partial inference" ~]]
8055− =/ value=iresult $(e val.e)
8056− ?: ?=(%| -.value) value
8057− =/ result=(unit itype) (template-apply u.standard ~[typ.p.value])
8058− ?~ result [%| ["unit construction is not supported by partial inference" ~]]
5752+ ?: interpolated [%| ["interpolation is not supported by partial inference" ~]]
8059− [%& u.result state.p.value]
5753+ [%& [%atom %t] state]
8060− %list
8061− ?~ prelude.state [%| ["list literal needs the standard prelude in partial inference" ~]]
8062− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
8063− [%| ["list literal needs the standard prelude in partial inference" ~]]
8064− =/ standard=(unit ischeme) (find-jibb-mold %list u.prelude.state)
8065− ?~ standard [%| ["list literal needs the standard prelude in partial inference" ~]]
8066− ?. =(u.standard [[%collection %list ~[[%var 0]]] ~[0]])
8067− [%| ["list literal needs the standard prelude in partial inference" ~]]
8068− =/ element=itype [%var next.state]
8069− =/ result=iresult (infer-open-list-items items.e element env state(next +(next.state)) at.e)
8070− ?: ?=(%| -.result) result
8071− [%& [%collection %list ~[element]] state.p.result]
8072− %str (infer-string-pieces pieces.e env state)
8073− %qath
8074− ?~ prelude.state [%| ["application path needs the standard prelude in partial inference" ~]]
8075− ?. =(at.u.prelude.state /lib/jibb/prelude/jibb)
8076− [%| ["application path needs the standard prelude in partial inference" ~]]
8077− =/ standard=(unit ischeme) (find-jibb-mold %qath u.prelude.state)
8078− ?~ standard [%| ["application path needs the standard prelude in partial inference" ~]]
8079− ?. ?=(~ vars.u.standard) [%| ["application path mold needs unsupported inference" ~]]
8080− =/ typ=itype typ.u.standard
8081− ?. ?=(%jrec -.typ) [%| ["application path mold needs unsupported inference" ~]]
8082− ?. &(=(at.typ /lib/jibb/internal/jibb) =(%qath name.typ) =(%i head.typ) =(%ta aura.typ) =(%t tail.typ))
8083− [%| ["application path mold needs unsupported inference" ~]]
8084− ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8085− =/ remain=(unit @ud) (qath-static-fuel segs.e (dec jrec-fuel.state))
8086− ?~ remain [%| ["application path segments need unsupported inference" ~]]
8087− [%& typ state(jrec-fuel u.remain)]
8088 %wing
5754 %wing
8089 ?~ names.e [%| ["empty wing" ~]]
5755 ?~ names.e [%| ["empty wing" ~]]
8090 ?^ t.names.e
5756 ?^ t.names.e
@@ -8093,25 +5759,14 @@
8093 ?~ iface (infer-field-wing names.e env state)
5759 ?~ iface (infer-field-wing names.e env state)
8094 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
5760 =/ member=(unit ischeme) (ienv-lookup i.names.e values.u.iface)
8095 ?~ member [%| ["module member is not available to partial inference" ~]]
5761 ?~ member [%| ["module member is not available to partial inference" ~]]
8096− =. typ.u.member (itype-in-import typ.u.member u.iface i.t.names.e prelude.state)
8097 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
5762 =/ instance=[typ=itype state=istate] (instantiate-scheme u.member state)
8098 [%& typ.instance state.instance]
5763 [%& typ.instance state.instance]
8099 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
5764 =/ scheme=(unit ischeme) (ienv-lookup i.names.e env)
8100− ?~ scheme
8101− ?~ prelude.state [%| ["name is not available to partial inference" ~]]
5765+ ?~ scheme [%| ["name is not available to partial inference" ~]]
8102− =/ prelude-entry=(unit ischeme) (ienv-lookup i.names.e values.u.prelude.state)
8103− ?~ prelude-entry [%| ["name is not available to partial inference" ~]]
8104− =/ inst=[typ=itype state=istate] (instantiate-scheme u.prelude-entry state)
8105− [%& typ.inst state.inst]
8106 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
5766 =/ instance=[typ=itype state=istate] (instantiate-scheme u.scheme state)
8107 [%& typ.instance state.instance]
5767 [%& typ.instance state.instance]
8108 %group $(e inner.e)
5768 %group $(e inner.e)
8109− %change
8110− ?~ edits.e [%| ["a change takes at least one field" ~[[at.e "empty change"]]]]
8111− =/ target=iresult $(e [%wing at.e target.e])
8112− ?: ?=(%| -.target) target
8113− (infer-change-edits edits.e typ.p.target env state.p.target ~)
8114− %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [[next.state tag.e] tags.state])]
5769+ %ctor [%& [%tag next.state tag.e &] state(next +(next.state), tags [next.state tags.state])]
8115 %trace
5770 %trace
8116 =/ traced=iresult $(e val.e)
5771 =/ traced=iresult $(e val.e)
8117 ?: ?=(%| -.traced) traced
5772 ?: ?=(%| -.traced) traced
@@ -8127,9 +5782,6 @@
8127 [%| ["local molds shadow a name" ~]]
5782 [%| ["local molds shadow a name" ~]]
8128 =/ local-state=istate
5783 =/ local-state=istate
8129 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
5784 state(globals (weld local-names globals.state), molds (weld local-molds molds.state))
8130− =/ mold-hole=(unit span) (simple-local-mold-hole defs.e)
8131− ?^ mold-hole
8132− [%| ["type hole needs a determined type" ~[[u.mold-hole "unresolved type hole"]]]]
8133 ?. (local-molds-supported local-molds local-state)
5785 ?. (local-molds-supported local-molds local-state)
8134 [%| ["local molds need unsupported inference" ~]]
5786 [%| ["local molds need unsupported inference" ~]]
8135 =/ values=(list def) (local-value-defs defs.e)
5787 =/ values=(list def) (local-value-defs defs.e)
@@ -8140,30 +5792,18 @@
8140 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
5792 [%& typ.p.result state.p.result(globals globals.state, molds molds.state)]
8141 %branch
5793 %branch
8142 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
5794 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
8143− ?~ t.arms.e
8144− ?: (single-structured-pattern e) (infer-single-case-branch e env state ~)
8145− (infer-cell-branch e env state ~)
5795+ ?~ t.arms.e (infer-cell-branch e env state)
8146− ?^ t.t.arms.e (infer-known-union-branch e env state)
5796+ ?^ t.t.arms.e [%| ["branch is not supported by partial inference" ~]]
8147− =/ known=(unit iresult) (known-union-subject subject.e env state)
8148− ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
8149− ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
8150− (infer-known-union-branch-subject e env u.known)
8151 =/ x=arm i.arms.e
5797 =/ x=arm i.arms.e
8152 =/ y=arm i.t.arms.e
5798 =/ y=arm i.t.arms.e
8153− ?: |((unit-empty-pattern pat.x) (unit-empty-pattern pat.y))
5799+ ?. ?=(%lit -.pat.x) [%| ["branch pattern is not supported by partial inference" ~]]
8154− (infer-unit-branch e env state ~)
5800+ ?. ?=(%lit -.pat.y) [%| ["branch pattern is not supported by partial inference" ~]]
8155− ?. ?=(%lit -.pat.x) (infer-known-union-branch e env state)
8156− ?. ?=(%lit -.pat.y) (infer-known-union-branch e env state)
8157 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
5801 ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y))
8158− (infer-known-union-branch e env state)
5802+ [%| ["branch pattern is not supported by partial inference" ~]]
8159− ?: &(?=(^ known) ?=(%& -.u.known)) (infer-known-union-branch-subject e env u.known)
8160 ?: =(val.lit.pat.x val.lit.pat.y)
5803 ?: =(val.lit.pat.x val.lit.pat.y)
8161 [%| ["branch does not cover both loobeans" ~]]
5804 [%| ["branch does not cover both loobeans" ~]]
8162 =/ subject=iresult $(e subject.e)
5805 =/ subject=iresult $(e subject.e)
8163 ?: ?=(%| -.subject) subject
5806 ?: ?=(%| -.subject) subject
8164− =/ subject-type=itype (itype-normalize typ.p.subject sub.state.p.subject)
8165− ?: ?=(%union -.subject-type)
8166− [%| ["union-pattern branch subject is not supported by partial inference" ~]]
8167 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
5807 =/ su=(unit isub) (itype-unify typ.p.subject [%flag ~] sub.state.p.subject)
8168 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
5808 ?~ su [%| ["loobean branch subject does not unify with ?" ~]]
8169 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
5809 =/ left=iresult $(e val.x, state state.p.subject(sub u.su))
@@ -8176,8 +5816,6 @@
8176 [%| ["branch widening is not supported by partial inference" ~]]
5816 [%| ["branch widening is not supported by partial inference" ~]]
8177 =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
5817 =/ joined=(unit isub) (itype-unify typ.p.left typ.p.right sub.state.p.right)
8178 ?~ joined
5818 ?~ joined
8179− ?: |((itype-has-recursive ltype) (itype-has-recursive rtype))
8180− [%| ["recursive branch matching is not supported by partial inference" ~]]
8181 ?: |((itype-has-tag ltype) (itype-has-tag rtype) (itype-has-union ltype) (itype-has-union rtype))
5819 ?: |((itype-has-tag ltype) (itype-has-tag rtype) (itype-has-union ltype) (itype-has-union rtype))
8182 [%| ["branch tag or union context is not supported by partial inference" ~]]
5820 [%| ["branch tag or union context is not supported by partial inference" ~]]
8183 =/ common=(unit itype) (itype-concrete-join typ.p.left typ.p.right sub.state.p.right)
5821 =/ common=(unit itype) (itype-concrete-join typ.p.left typ.p.right sub.state.p.right)
@@ -8190,509 +5828,53 @@
8190 [%& typ.p.left state.p.right(sub u.joined)]
5828 [%& typ.p.left state.p.right(sub u.joined)]
8191 %cast
5829 %cast
8192 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
5830 =/ target=(unit [typ=itype state=istate]) (infer-simple-shape shape.e state)
8193− ?~ target
8194− =/ diag=(unit idiag) (nested-import-invalid shape.e state)
8195− ?^ diag [%| u.diag]
8196− [%| ["cast mold is not supported by partial inference" ~]]
5831+ ?~ target [%| ["cast mold is not supported by partial inference" ~]]
8197− =/ value=iresult
5832+ =/ value=iresult $(e val.e, state state.u.target)
8198− (infer-call-context-arg val.e typ.u.target env state.u.target at.shape.e)
8199 ?: ?=(%| -.value) value
5833 ?: ?=(%| -.value) value
8200− =/ shape=(unit [source=iwfields target=iwfields])
8201− (width-shape typ.p.value typ.u.target sub.state.p.value)
8202− ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
8203 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
5834 =/ fit=ifit (itype-fit typ.p.value typ.u.target sub.state.p.value next.state.p.value)
8204 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
5835 ?: ?=(%unknown -.fit) [%| ["cast constraint is not supported by partial inference" ~]]
8205 ?: ?=(%bad -.fit)
5836 ?: ?=(%bad -.fit)
8206− =/ missing=(unit idiag) (missing-union-tag val.e typ.u.target sub.state.p.value at.shape.e)
8207− ?^ missing [%| u.missing]
8208− =/ 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)
8209− ?^ nested [%| u.nested]
8210 [%| ["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)]]]]
5837 [%| ["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)]]]]
8211 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
5838 =/ merged=itype (itype-merge-faces typ.p.value typ.u.target sub.fit)
8212 [%& merged state.p.value(sub sub.fit, next next.fit)]
5839 [%& merged state.p.value(sub sub.fit, next next.fit)]
8213 %crash [%& [%var next.state] state(next +(next.state))]
5840 %crash [%& [%var next.state] state(next +(next.state))]
8214 %gate
5841 %gate
8215 =/ sam=isample-result (infer-sample sample.e env state)
5842 =/ sam=isample-result (infer-sample sample.e env state)
8216− ?: ?=(%| -.sam)
8217− =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
8218− ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8219− [%| [p.sam ~]]
5843+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8220 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
5844 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
8221 ?: ?=(%| -.body) body
5845 ?: ?=(%| -.body) body
8222 [%& [%fn typ.p.sam typ.p.body] state.p.body]
5846 [%& [%fn typ.p.sam typ.p.body] state.p.body]
8223 %gate-wide
5847 %gate-wide
8224 =/ sam=isample-result (infer-sample sample.e env state)
5848 =/ sam=isample-result (infer-sample sample.e env state)
8225− ?: ?=(%| -.sam)
8226− =/ diag=(unit idiag) (sample-import-invalid sample.e env state)
8227− ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
8228− [%| [p.sam ~]]
5849+ ?: ?=(%| -.sam) [%| [p.sam ~]]
8229 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
5850 =/ body=iresult $(e body.e, env env.p.sam, state state.p.sam)
8230 ?: ?=(%| -.body) body
5851 ?: ?=(%| -.body) body
8231 [%& [%fn typ.p.sam typ.p.body] state.p.body]
5852 [%& [%fn typ.p.sam typ.p.body] state.p.body]
8232 %call
5853 %call
8233 ?~ args.e [%| ["call has no argument" ~]]
5854 ?~ args.e [%| ["call has no argument" ~]]
8234− ?: (explicit-proj-call e env state)
5855+ ?^ t.args.e [%| ["multiple arguments are not supported by partial inference" ~]]
8235− [%| ["proj needs an expected record type" ~]]
5856+ =/ head=iresult $(e head.e)
8236− (infer-call-with-head e env state (infer-fragment head.e env state))
5857+ ?: ?=(%| -.head) head
5858+ =/ arg=iresult $(e i.args.e, state state.p.head)
5859+ ?: ?=(%| -.arg) arg
5860+ =/ st=istate state.p.arg
5861+ =/ ht=itype (itype-walk typ.p.head sub.st)
5862+ ?: ?=(%fn -.ht)
5863+ =/ fit=ifit (itype-fit typ.p.arg sample.ht sub.st next.st)
5864+ ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
5865+ ?: ?=(%bad -.fit)
5866+ [%| ["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)]]]]
5867+ ?: &((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))
5868+ [%| ["call result face propagation is not supported by partial inference" ~]]
5869+ [%& product.ht st(sub sub.fit, next next.fit)]
5870+ =/ result=itype [%var next.st]
5871+ =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
5872+ ?~ uni
5873+ [%| ["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)]]]]
5874+ [%& result st(next +(next.st), sub u.uni)]
8237 * [%| ["expression is not supported by partial inference" ~]]
5875 * [%| ["expression is not supported by partial inference" ~]]
8238 ==
5876 ==
8239::
5877::
8240−:: Locate a definite failing argument after the complete sample fit has
8241−:: failed. If an intermediate fit is uncertain, retain the whole argument
8242−:: span rather than assigning blame to a particular argument.
8243−::
8244−:: Check a call using the head already inferred in this state. Keeping
8245−:: this shared avoids evaluating or instantiating a contextual head twice.
8246−++ width-has-projections
8247− |= ps=(list iwprojection)
8248− ^- ?
8249− ?~ ps |
8250− &
8251−::
8252−+$ iwidth-elaboration [original=expr typ=itype sub=isub projections=(list iwprojection)]
8253−++ infer-width-elaboration
8254− |= [e=expr env=ienv state=istate]
8255− ^- (each iwidth-elaboration idiag)
8256− =/ out=iresult (infer-fragment e env state)
8257− ?: ?=(%| -.out) [%| p.out]
8258− [%& [e typ.p.out sub.state.p.out (flop projections.state.p.out)]]
8259−::
8260−++ infer-call-with-head
8261− |= [e=expr env=ienv state=istate head=iresult]
8262− ^- iresult
8263− ?> ?=(%call -.e)
8264− ?~ args.e [%| ["call has no argument" ~]]
8265− ?: ?=(%| -.head) head
8266− =/ head-type=itype (itype-walk typ.p.head sub.state.p.head)
8267− =/ arg=iresult
8268− ?^ t.args.e
8269− ?: ?=(%fn -.head-type)
8270− (infer-call-context-args args.e sample.head-type env state.p.head (span-of head.e))
8271− (infer-simple-items (turn args.e |=(a=expr [(span-of a) ~ a])) env state.p.head)
8272− ?: ?=(%fn -.head-type)
8273− (infer-call-context-arg i.args.e sample.head-type env state.p.head (span-of head.e))
8274− (infer-fragment i.args.e env state.p.head)
8275− ?: ?=(%| -.arg) arg
8276− =/ st=istate state.p.arg
8277− =/ ht=itype (itype-walk typ.p.head sub.st)
8278− ?: ?=(%fn -.ht)
8279− =/ shape=(unit [source=iwfields target=iwfields])
8280− ?^ t.args.e ~
8281− (width-shape typ.p.arg sample.ht sub.st)
8282− ?^ shape [%| ["record width constraint needs unsupported inference" ~]]
8283− =/ fit=ifit
8284− ?^ t.args.e (itype-fit-inner typ.p.arg sample.ht sub.st next.st & |)
8285− (itype-fit typ.p.arg sample.ht sub.st next.st)
8286− ?: ?=(%unknown -.fit) [%| ["call constraint is not supported by partial inference" ~]]
8287− ?: ?=(%bad -.fit)
8288− ?~ t.args.e
8289− =/ missing=(unit idiag) (missing-union-tag i.args.e sample.ht sub.st (span-of head.e))
8290− ?^ missing [%| u.missing]
8291− =/ nested=(unit idiag) (nested-missing-tag i.args.e typ.p.arg sample.ht sub.st next.st (span-of head.e))
8292− ?^ nested [%| u.nested]
8293− [%| ["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)]]]]
8294− =/ bad=(unit [at=span typ=itype])
8295− (call-error-site args.e typ.p.arg sample.ht sub.st next.st)
8296− =/ whole-args=span
8297− [beg:(span-of i.args.e) end:(span-of (rear args.e))]
8298− =/ arg-at=span ?~(bad whole-args at.u.bad)
8299− =/ arg-type=itype ?~(bad typ.p.arg typ.u.bad)
8300− [%| ["call's sample and argument types do not unify" ~[[(span-of head.e) (site-type-note "called gate" ht sub.st)] [arg-at (site-type-note "argument" arg-type sub.st)]]]]
8301− =/ face-asym=?
8302− ?^ t.args.e (itype-positional-face-asym args.e typ.p.arg sample.ht sub.fit)
8303− (itype-face-asym typ.p.arg sample.ht sub.fit)
8304− ?: &((itype-has-face typ.p.arg sub.fit) face-asym (itype-output-may-be-cell product.ht sub.fit))
8305− [%| ["call result face propagation is not supported by partial inference" ~]]
8306− [%& product.ht st(sub sub.fit, next next.fit)]
8307− =/ result=itype [%var next.st]
8308− =/ uni=(unit isub) (itype-unify ht [%fn typ.p.arg result] sub.st)
8309− ?~ uni
8310− [%| ["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)]]]]
8311− [%& result st(next +(next.st), sub u.uni)]
8312−::
8313−++ call-error-site
8314− |= [args=(list expr) actual=itype expected=itype sub=isub next=@ud]
8315− ^- (unit [at=span typ=itype])
8316− ?~ args ~
8317− =/ original=[left=itype right=itype] [actual expected]
8318− ?: |(?=(%var -.left.original) ?=(%avar -.left.original) ?=(%rvar -.left.original) |(?=(%nvar -.left.original) ?=(%rnvar -.left.original)) ?=(%var -.right.original) ?=(%avar -.right.original) ?=(%rvar -.right.original) |(?=(%nvar -.right.original) ?=(%rnvar -.right.original))) ~
8319− =. actual (itype-walk actual sub)
8320− =. expected (itype-walk expected sub)
8321− ?: &(?=(%face -.expected) !?=(%face -.actual))
8322− $(expected body.expected)
8323− ?~ t.args
8324− =/ fit=ifit (itype-fit actual expected sub next)
8325− ?. ?=(%bad -.fit) ~
8326− `[(span-of i.args) (itype-normalize actual sub)]
8327− ?. &(?=(%cell -.actual) ?=(%cell -.expected)) ~
8328− =/ first=ifit (itype-fit hed.actual hed.expected sub next)
8329− ?: ?=(%bad -.first) `[(span-of i.args) (itype-normalize hed.actual sub)]
8330− ?: ?=(%unknown -.first) ~
8331− $(args t.args, actual tal.actual, expected tal.expected, sub sub.first, next next.first)
8332−::
8333−:: Context can help a call argument or cast value while the final fit
8334−:: checks the complete right-nested type, including any written faces.
8335−::
8336−:: Context can resolve the payload of a canonical prelude unit, but an
8337−:: unrelated union with a similar noun shape is not the same mold.
8338−++ infer-unit-context
8339− |= [e=expr expected=itype env=ienv state=istate context=span]
8340− ^- iresult
8341− ?> ?=(%unit -.e)
8342− ?> ?=(%union -.expected)
8343− ?~ prelude.state (infer-fragment e env state)
8344− =/ standard=(unit ischeme) (find-jibb-mold %unit u.prelude.state)
8345− ?~ standard (infer-fragment e env state)
8346− ?. (standard-unit-template u.standard at.u.prelude.state) (infer-fragment e env state)
8347− ?. =(origin.expected `[at.u.prelude.state %unit]) (infer-fragment e env state)
8348− ?~ args.expected (infer-fragment e env state)
8349− ?^ t.args.expected (infer-fragment e env state)
8350− =/ payload=itype i.args.expected
8351− =/ canonical=(unit itype) (template-apply u.standard ~[payload])
8352− ?~ canonical (infer-fragment e env state)
8353− ?> ?=(%union -.u.canonical)
8354− ?. =((itype-normalize expected(label ~) sub.state) (itype-normalize u.canonical(label ~) sub.state))
8355− (infer-fragment e env state)
8356− =/ value=iresult (infer-call-context-arg val.e payload env state context)
8357− ?: ?=(%| -.value) value
8358− =/ fit=ifit (itype-fit typ.p.value payload sub.state.p.value next.state.p.value)
8359− ?: ?=(%unknown -.fit) [%| ["unit payload constraint is not supported by partial inference" ~]]
8360− ?: ?=(%bad -.fit)
8361− =/ missing=(unit idiag) (missing-union-tag val.e payload sub.state.p.value context)
8362− ?^ missing [%| u.missing]
8363− =/ nested=(unit idiag) (nested-missing-tag val.e typ.p.value payload sub.state.p.value next.state.p.value context)
8364− ?^ nested [%| u.nested]
8365− [%| ["unit payload does not fit its expected type" ~[[context (site-type-note "expected unit payload" payload sub.state.p.value)] [(span-of val.e) (site-type-note "payload" typ.p.value sub.state.p.value)]]]]
8366− [%& expected state.p.value(sub sub.fit, next next.fit)]
8367−::
8368−:: A known gate may receive an enclosing target before its argument is
8369−:: inferred when its result is open or a direct, matching named generic
8370−:: union. Opaque, recursive, tag-constrained and variable-bound union
8371−:: results keep the existing directional path.
8372−++ infer-contextual-call
8373− |= [e=expr expected=itype env=ienv state=istate]
8374− ^- iresult
8375− ?> ?=(%call -.e)
8376− ?~ args.e [%| ["call has no argument" ~]]
8377− =/ head=iresult (infer-fragment head.e env state)
8378− ?: ?=(%| -.head) head
8379− =/ ht=itype (itype-walk typ.p.head sub.state.p.head)
8380− ?. ?=(%fn -.ht) (infer-call-with-head e env state head)
8381− =/ result=itype (itype-walk product.ht sub.state.p.head)
8382− =/ eligible=?
8383− ?: ?=(%var -.result) &
8384− :: A direct known generic union may receive the same nominal result
8385− :: context before its arguments are checked. Variable-bound origins,
8386− :: pending tags, recursive identities and unknown atoms stay open.
8387− ?. &(?=(%union -.product.ht) ?=(%union -.result) ?=(%union -.expected)) |
8388− ?~ origin.result |
8389− ?. =(origin.result origin.expected) |
8390− ?~ args.result |
8391− ?. =((lent args.result) (lent args.expected)) |
8392− ?: |((itype-has-tag (itype-normalize result sub.state.p.head)) (itype-has-tag (itype-normalize expected sub.state.p.head))) |
8393− ?: |((itype-has-recursive (itype-normalize result sub.state.p.head)) (itype-has-recursive (itype-normalize expected sub.state.p.head))) |
8394− ?: |((itype-has-any-atom result sub.state.p.head) (itype-has-any-atom expected sub.state.p.head)) |
8395− &
8396− ?. eligible (infer-call-with-head e env state head)
8397− ?: |(?=(%var -.expected) ?=(%avar -.expected) ?=(%rvar -.expected) |(?=(%nvar -.expected) ?=(%rnvar -.expected)) (itype-has-tag (itype-normalize expected sub.state.p.head)))
8398− (infer-call-with-head e env state head)
8399− =/ sub=(unit isub) (itype-unify result expected sub.state.p.head)
8400− ?~ sub (infer-call-with-head e env state head)
8401− (infer-call-with-head e env state [%& typ.p.head state.p.head(sub u.sub)])
8402−::
8403−:: An eligible fully faced literal receives context by name, in source order.
8404−++ width-literal-fields
8405− |= [items=(list item) axis=@ud fuel=@ud]
8406− ^- (unit iwfields)
8407− =/ order=(list iwfield) ~
8408− =/ index=(map term iwfield) *(map term iwfield)
8409− |-
8410− ?~ items ~
8411− ?: =(0 fuel) ~
8412− ?~ face.i.items ~
8413− =/ at-axis=@ud ?~(t.items axis (mul 2 axis))
8414− =/ entry=iwfield [u.face.i.items at-axis [%noun ~]]
8415− ?: ?=(^ (~(get by index) name.entry)) ~
8416− =. index (~(put by index) name.entry entry)
8417− =. order [entry order]
8418− ?~ t.items `[(flop order) index]
8419− $(items t.items, axis +((mul 2 axis)), fuel (dec fuel))
8420−++ width-infer-items
8421− |= [items=(list item) expected=(map term iwfield) env=ienv state=istate context=span]
8422− ^- iresult
8423− ?~ items [%| ["empty record is not supported" ~]]
8424− ?~ face.i.items [%| ["record face needs unsupported inference" ~]]
8425− =/ field=(unit iwfield) (~(get by expected) u.face.i.items)
8426− =/ head=iresult
8427− ?~ field (infer-fragment val.i.items env state)
8428− (infer-call-context-arg val.i.items typ.u.field env state context)
8429− ?: ?=(%| -.head) head
8430− =/ typ=itype [%face u.face.i.items typ.p.head]
8431− ?~ t.items [%& typ state.p.head]
8432− =/ tail=iresult $(items t.items, state state.p.head)
8433− ?: ?=(%| -.tail) tail
8434− [%& [%cell typ typ.p.tail] state.p.tail]
8435−++ width-infer-literal
8436− |= [e=expr expected=itype env=ienv state=istate context=span]
8437− ^- (unit iresult)
8438− ?. ?=(%tuple -.e) ~
8439− ?. |(?=(%cell -.expected) ?=(%face -.expected)) ~
8440− =/ source=(unit iwfields) (width-literal-fields items.e 1 4.096)
8441− =/ target=(unit iwfields) (width-scan expected sub.state 1 4.096)
8442− ?~ source ~
8443− ?~ target ~
8444− ?: (lth (lent order.u.source) (lent order.u.target)) ~
8445− ?. (width-in-order order.u.source order.u.target)
8446− `(infer-simple-items items.e env state)
8447− `(width-infer-items items.e index.u.target env state context)
8448−::
8449−:: Experimental intrinsic recognition; real bindings retain normal calls.
8450−++ explicit-proj-call
8451− |= [e=expr env=ienv state=istate]
8452− ^- ?
8453− ?. ?=(%call -.e) |
8454− ?. ?=([* ~] args.e) |
8455− ?. ?=(%wing -.head.e) |
8456− ?. =(names.head.e ~[%proj]) |
8457− ?: ?=(^ (ienv-lookup %proj env)) |
8458− ?: (lien globals.state |=(n=term =(n %proj))) |
8459− ?~ prelude.state &
8460− ?:(?=(^ (ienv-lookup %proj values.u.prelude.state)) | &)
8461−++ infer-proj-source
8462− |= [e=expr expected=itype env=ienv state=istate context=span]
8463− ^- iresult
8464− ?: ?=(%group -.e) $(e inner.e)
8465− =/ literal=(unit iresult) (width-infer-literal e expected env state context)
8466− ?^ literal u.literal
8467− (infer-fragment e env state)
8468−++ infer-proj-context
8469− |= [e=expr expected=itype env=ienv state=istate context=span]
8470− ^- iresult
8471− ?> ?=(%call -.e)
8472− ?~ args.e [%| ["proj needs one record" ~]]
8473− ?. |(?=(%cell -.expected) ?=(%face -.expected)) [%| ["proj needs an expected record type" ~]]
8474− =/ value=iresult (infer-proj-source i.args.e expected env state context)
8475− ?: ?=(%| -.value) value
8476− =/ shape=(unit [source=iwfields target=iwfields])
8477− (width-proj-shape typ.p.value expected sub.state.p.value)
8478− ?~ shape [%| ["proj needs a known record containing its expected fields" ~]]
8479− =/ project=(unit iwidth-result) (width-project u.shape sub.state.p.value next.state.p.value)
8480− ?~ project [%| ["proj constraint needs unsupported inference" ~]]
8481− =/ st=istate state.p.value(sub sub.u.project, next next.u.project)
8482− [%& expected st(projections [[at.e e typ.p.value expected steps.u.project] projections.st])]
8483−::
8484−:: A known literal singleton in a direct union can contextualize a
8485−:: loobean literal of the same noun. Only explicit singleton and cell
8486−:: competitors are considered; opaque or variable cases stay unknown.
8487−++ explicit-singleton-in-union
8488− |= [t=itype noun=@]
8489− ^- ?
8490− ?. ?=(%union -.t) |
8491− =/ cases=(list itype) cases.t
8492− =/ found=? |
8493− |-
8494− ?~ cases found
8495− =/ c=itype i.cases
8496− ?: ?=(%cell -.c) $(cases t.cases)
8497− ?. ?=(%const -.c) |
8498− ?: =(noun val.literal.c)
8499− ?: found |
8500− $(cases t.cases, found &)
8501− $(cases t.cases)
8502−::
8503−:: Select a written literal-headed case only when every competing case is
8504−:: also an explicit singleton-headed cell and exactly one matches. Opaque,
8505−:: variable-bound and differently shaped cases keep inference unchanged.
8506−:: This first slice supplies context to a directly called payload. Plain
8507−:: literal data and other expressions retain their existing inference path.
8508−++ contextual-atomic-arguments
8509− |= args=(list expr)
8510− ^- ?
8511− ?~ args &
8512− ?. ?=(?(%lit %wing %ctor) -.i.args) |
8513− $(args t.args)
8514−++ contextual-direct-payload-call
8515− |= e=expr
8516− ^- ?
8517− ?: ?=(%group -.e) $(e inner.e)
8518− ?. ?=(%call -.e) |
8519− ?. ?=(%wing -.head.e) |
8520− ?~ args.e |
8521− (contextual-atomic-arguments args.e)
8522−::
8523−:: A walked variable may have concealed a union inside a substituted
8524−:: structure before this arm was called. Decline in that case rather than
8525−:: deriving provenance from the already-walked type.
8526−++ contextual-simple-sub
8527− |= sub=isub
8528− ^- ?
8529− ?~ sub &
8530− ?: ?=(?(%cell %face %fn %union %collection) -.val.i.sub) |
8531− $(sub t.sub)
8532−::
8533−++ contextual-direct-union
8534− |= target=itype
8535− ^- ?
8536− ?: ?=(%face -.target) $(target body.target)
8537− ?=(%union -.target)
8538−++ contextual-tagged-case
8539− |= [target=itype tag=@ sub=isub]
8540− ^- (unit itype)
8541− ?. ?=(%union -.target) ~
8542− =/ remaining=(list itype) cases.target
8543− =/ found=(unit itype) ~
8544− =/ seen=(set @) *(set @)
8545− |-
8546− ?~ remaining found
8547− =/ c=itype i.remaining
8548− ?. ?=(%cell -.c) ~
8549− =/ head=itype hed.c
8550− ?. ?=(%const -.head) ~
8551− ?: (~(has in:..zuse seen) val.literal.head) ~
8552− =. seen (~(put in:..zuse seen) val.literal.head)
8553− ?: =(tag val.literal.head)
8554− $(remaining t.remaining, found `c)
8555− $(remaining t.remaining)
8556−::
8557−++ infer-call-context-arg
8558− |= [e=expr expected=itype env=ienv state=istate context=span]
8559− ^- iresult
8560− ?: ?=(%pair -.e) $(e (pair-as-cell e))
8561− ?: ?=(%group -.e) $(e inner.e)
8562− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
8563− ?: ?=(%trace -.e)
8564− =/ traced=iresult (infer-fragment val.e env state)
8565− ?: ?=(%| -.traced) traced
8566− $(e then.e, state state.p.traced)
8567− =/ target=itype (itype-walk expected sub.state)
8568− |-
8569− ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8570− ?: (explicit-proj-call e env state)
8571− (infer-proj-context e expected env state context)
8572− :: Only the source-proven one-layer cell is exposed. Each recursive
8573− :: descent consumes one written tuple; named values use ordinary fit.
8574− ?: &(?=(%jrec -.target) ?=(%lit -.e) =(%null form.lit.e))
8575− ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8576− [%& target state(jrec-fuel (dec jrec-fuel.state))]
8577− ?: &(?=(%jrec -.target) ?=(%tuple -.e))
8578− ?: =(0 jrec-fuel.state) [%| ["recursive mold unfolding needs unsupported inference" ~]]
8579− =. state state(jrec-fuel (dec jrec-fuel.state))
8580− =/ shape=itype
8581− [%cell [%face head.target [%atom aura.target]] [%face tail.target target]]
8582− =/ value=iresult (infer-call-context-items items.e shape env state context)
8583− ?: ?=(%| -.value) value
8584− =/ fit=ifit (itype-fit typ.p.value shape sub.state.p.value next.state.p.value)
8585− ?: ?=(%unknown -.fit) [%| ["recursive mold cell constraint needs unsupported inference" ~]]
8586− ?: ?=(%bad -.fit) [%| ["recursive mold cell does not fit its source shape" ~]]
8587− [%& target state.p.value(sub sub.fit, next next.fit)]
8588− ?: ?=(%call -.e) (infer-contextual-call e target env state)
8589− ?: (single-structured-pattern e)
8590− (infer-single-case-branch e env state `[target context])
8591− ?: (cell-binder-pattern e)
8592− (infer-cell-branch e env state `[target context])
8593− :: In an explicit singleton context retain the written loobean noun;
8594− :: the ordinary singleton fit compares its noun, not its spelling.
8595− =/ singleton=(unit itype)
8596− ?. ?=(%lit -.e) ~
8597− ?. =(%loobean form.lit.e) ~
8598− ?. |(?=(%const -.target) &(?=(%union -.expected) (explicit-singleton-in-union expected val.lit.e))) ~
8599− `[%const lit.e]
8600− ?^ singleton [%& u.singleton state]
8601− =/ known=(unit iresult)
8602− ?: ?=(%branch -.e) (known-union-subject subject.e env state)
8603− ~
8604− ?: &(?=(^ known) ?=(%| -.u.known) !(duplicate-loobean-arms e)) u.known
8605− ?: &(?=(^ known) ?=(%& -.u.known) ?=(~ (unit-union-payload (itype-normalize typ.p.u.known sub.state.p.u.known))))
8606− (infer-known-union-context-subject e target env u.known context)
8607− ?: &(?=(%union -.target) ?=(%unit -.e))
8608− (infer-unit-context e target env state context)
8609− ?: &(?=(%flag -.target) (context-union-branch e))
8610− (infer-union-context e target env state context)
8611− ?: &(?=(%union -.target) (context-union-branch e))
8612− (infer-union-context e target env state context)
8613− ?: &(?=(%collection -.target) =(%list name.target) (context-union-branch e))
8614− (infer-union-context e target env state context)
8615− ?: &(?=(%collection -.target) =(%list name.target) (context-list-expression e))
8616− (infer-list-context e target env state context)
8617− :: A literal-headed tuple can receive the unique case's payload
8618− :: context. The ordinary final fit still checks the complete union.
8619− =/ selected=(unit itype)
8620− ?. &((contextual-simple-sub sub.state) (contextual-direct-union expected) ?=(%union -.target) ?=(%tuple -.e) ?=(^ items.e)) ~
8621− ?~ t.items.e ~
8622− ?^ t.t.items.e ~
8623− ?. (contextual-direct-payload-call val.i.t.items.e) ~
8624− =/ first=item i.items.e
8625− ?. &(?=(~ face.first) ?=(%lit -.val.first) |(=(%term form.lit.val.first) =(%null form.lit.val.first) =(%loobean form.lit.val.first))) ~
8626− (contextual-tagged-case target val.lit.val.first sub.state)
8627− ?^ selected
8628− ?> ?=(%tuple -.e)
8629− :: On this bounded shallow-call shape, preserve any inference that
8630− :: already fits before trying the new contextual path. Neither pass
8631− :: can recursively select a nested tuple from the atomic arguments.
8632− =/ ordinary=(unit iresult)
8633− =/ initial=iresult (infer-fragment e env state)
8634− ?: ?=(%| -.initial) ~
8635− =/ fit=ifit (itype-fit typ.p.initial target sub.state.p.initial next.state.p.initial)
8636− ?. ?=(%ok -.fit) ~
8637− `initial
8638− ?^ ordinary u.ordinary
8639− =/ value=iresult (infer-call-context-items items.e u.selected env state context)
8640− ?: ?=(%| -.value) value
8641− =/ fit=ifit (itype-fit typ.p.value u.selected sub.state.p.value next.state.p.value)
8642− ?: ?=(%unknown -.fit) [%| ["tagged case needs unsupported inference" ~]]
8643− ?: ?=(%bad -.fit) [%| ["tagged case does not fit its expected type" ~[[context "expected union case"] [(span-of e) "value"]]]]
8644− [%& typ.p.value state.p.value(sub sub.fit, next next.fit)]
8645− ?: &(?=(%cell -.target) ?=(%tuple -.e))
8646− (infer-call-context-items items.e target env state context)
8647− (infer-fragment e env state)
8648−::
8649−:: Preserve each written face; the final complete sample fit checks faces.
8650−:: A tuple or positional field face belongs to the enclosing sample,
8651−:: not to the expression at that position. A second face, if present,
8652−:: is part of the value's own expected type.
8653−++ projection-field-target
8654− |= expected=itype
8655− ^- itype
8656− ?:(?=(%face -.expected) body.expected expected)
8657−::
8658−++ infer-call-context-items
8659− |= [items=(list item) expected=itype env=ienv state=istate context=span]
8660− ^- iresult
8661− ?~ items [%| ["empty cell is not supported by partial inference" ~]]
8662− ?~ t.items
8663− =/ last=iresult (infer-call-context-arg val.i.items (projection-field-target expected) env state context)
8664− ?: ?=(%| -.last) last
8665− =/ typ=itype typ.p.last
8666− =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8667− [%& typ state.p.last]
8668− =/ target=itype (itype-walk expected sub.state)
8669− |-
8670− ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8671− ?. ?=(%cell -.target) (infer-simple-items items env state)
8672− =/ head=iresult (infer-call-context-arg val.i.items (projection-field-target hed.target) env state context)
8673− ?: ?=(%| -.head) head
8674− =/ typ=itype typ.p.head
8675− =. typ ?~(face.i.items typ [%face u.face.i.items typ])
8676− =/ tail=iresult (infer-call-context-items t.items tal.target env state.p.head context)
8677− ?: ?=(%| -.tail) tail
8678− [%& [%cell typ typ.p.tail] state.p.tail]
8679−::
8680−++ infer-call-context-args
8681− |= [args=(list expr) expected=itype env=ienv state=istate context=span]
8682− ^- iresult
8683− ?~ args [%| ["call has no argument" ~]]
8684− ?~ t.args (infer-call-context-arg i.args (projection-field-target expected) env state context)
8685− =/ target=itype (itype-walk expected sub.state)
8686− |-
8687− ?: ?=(%face -.target) $(target (itype-walk body.target sub.state))
8688− ?. ?=(%cell -.target)
8689− (infer-simple-items (turn args |=(a=expr [(span-of a) ~ a])) env state)
8690− =/ head=iresult (infer-call-context-arg i.args (projection-field-target hed.target) env state context)
8691− ?: ?=(%| -.head) head
8692− =/ tail=iresult (infer-call-context-args t.args tal.target env state.p.head context)
8693− ?: ?=(%| -.tail) tail
8694− [%& [%cell typ.p.head typ.p.tail] state.p.tail]
8695−::
8696:: Tuple and record expressions preserve their explicitly written faces.
5878:: Tuple and record expressions preserve their explicitly written faces.
8697::
5879::
8698++ infer-simple-items
5880++ infer-simple-items
@@ -8708,55 +5890,11 @@
8708 ?: ?=(%| -.tail) tail
5890 ?: ?=(%| -.tail) tail
8709 [%& [%cell ht typ.p.tail] state.p.tail]
5891 [%& [%cell ht typ.p.tail] state.p.tail]
8710::
5892::
8711−:: A single all-binder cell pattern covers a known cell spine; the final
5893+:: A single two-binder cell pattern covers every value of a cell type.
8712−:: binder captures the remaining noun. Other pattern matrices stay partial.
5894+:: No other pattern matrix is implemented here.
8713−::
8714−:: Validate binders before reading the subject, preserving shadow-error
8715−:: precedence. The last binder receives the entire remaining tail.
8716−++ cell-pattern-names
8717− |= [pats=(list pattern) env=ienv globals=(list term) seen=(list term)]
8718− ^- (each (list term) @t)
8719− ?~ pats [%& ~]
8720− ?. ?=(%bind -.i.pats) [%| 'branch pattern is not supported by partial inference']
8721− =/ name=term name.i.pats
8722− ?: |(=(name %proj) ?=(^ (ienv-lookup name env)) (lien globals |=(n=term =(n name))) (lien seen |=(n=term =(n name))))
8723− [%| 'pattern shadows a name']
8724− =/ rest=(each (list term) @t) $(pats t.pats, seen [name seen])
8725− ?: ?=(%| -.rest) rest
8726− [%& [name p.rest]]
8727−::
8728−++ cell-pattern-types
8729− |= [names=(list term) env=ienv next=@ud]
8730− ^- [typ=itype env=ienv next=@ud]
8731− ?~ names !!
8732− =/ head=itype [%var next]
8733− =/ scope=ienv [[i.names [head ~]] env]
8734− ?~ t.names [head scope +(next)]
8735− =/ tail=[typ=itype env=ienv next=@ud] $(names t.names, env scope, next +(next))
8736− [[%cell head typ.tail] env.tail next.tail]
8737−::
8738−:: At every position that must be a cell, opaque or sum types may still
8739−:: contain cells. Do not report a definite mismatch without unfolding them.
8740−++ cell-pattern-spine-unknown
8741− |= [typ=itype names=(list term) sub=isub]
8742− ^- ?
8743− ?~ names |
8744− ?~ t.names |
8745− =. typ (itype-walk typ sub)
8746− ?: ?=(%cell -.typ) $(typ tal.typ, names t.names)
8747− |(?=(%union -.typ) ?=(%collection -.typ) ?=(%recursive -.typ) ?=(%jrec -.typ) ?=(%noun -.typ) ?=(%fn -.typ) ?=(%tag -.typ))
8748−::
8749−++ cell-binder-pattern
8750− |= e=expr
8751− ^- ?
8752− ?. ?=(%branch -.e) |
8753− ?~ arms.e |
8754− ?^ t.arms.e |
8755− ?. ?=(%cell -.pat.i.arms.e) |
8756− !(single-structured-pattern e)
8757::
5895::
8758++ infer-cell-branch
5896++ infer-cell-branch
8759− |= [e=expr env=ienv state=istate expected=(unit [typ=itype context=span])]
5897+ |= [e=expr env=ienv state=istate]
8760 ^- iresult
5898 ^- iresult
8761 ?> ?=(%branch -.e)
5899 ?> ?=(%branch -.e)
8762 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
5900 ?~ arms.e [%| ["branch is not supported by partial inference" ~]]
@@ -8765,31 +5903,23 @@
8765 =/ pats=(list pattern) items.pat.arm
5903 =/ pats=(list pattern) items.pat.arm
8766 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
5904 ?~ pats [%| ["branch pattern is not supported by partial inference" ~]]
8767 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
5905 ?~ t.pats [%| ["branch pattern is not supported by partial inference" ~]]
8768− =/ names=(each (list term) @t) (cell-pattern-names pats env globals.state ~)
5906+ ?^ t.t.pats [%| ["branch pattern is not supported by partial inference" ~]]
8769− ?: ?=(%| -.names) [%| [(trip p.names) ~]]
5907+ ?. ?=(%bind -.i.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5908+ ?. ?=(%bind -.i.t.pats) [%| ["branch pattern is not supported by partial inference" ~]]
5909+ =/ one=term name.i.pats
5910+ =/ two=term name.i.t.pats
5911+ ?: |(=(one two) ?=(^ (ienv-lookup one env)) ?=(^ (ienv-lookup two env)) (lien globals.state |=(x=term |(=(x one) =(x two)))))
5912+ [%| ["pattern shadows a name" ~]]
8770 =/ subject=iresult (infer-fragment subject.e env state)
5913 =/ subject=iresult (infer-fragment subject.e env state)
8771 ?: ?=(%| -.subject) subject
5914 ?: ?=(%| -.subject) subject
8772 =/ st=istate state.p.subject
5915 =/ st=istate state.p.subject
8773− =/ subject-type=itype (itype-normalize typ.p.subject sub.st)
8774− ?: (itype-has-recursive subject-type)
8775− [%| ["recursive pattern is not supported by partial inference" ~]]
8776 ?: (itype-has-face typ.p.subject sub.st)
5916 ?: (itype-has-face typ.p.subject sub.st)
8777 [%| ["record patterns are not supported by partial inference" ~]]
5917 [%| ["record patterns are not supported by partial inference" ~]]
8778− ?: (cell-pattern-spine-unknown subject-type p.names sub.st)
5918+ =/ head=itype [%var next.st]
8779− [%| ["cell pattern subject is not supported by partial inference" ~]]
5919+ =/ tail=itype [%var +(next.st)]
8780− =/ binders=[typ=itype env=ienv next=@ud] (cell-pattern-types p.names env next.st)
8781− =/ sub=(unit isub) (itype-unify typ.p.subject typ.binders sub.st)
5920+ =/ sub=(unit isub) (itype-unify typ.p.subject [%cell head tail] sub.st)
8782 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
5921 ?~ sub [%| ["cell pattern does not match the subject type" ~]]
8783− =. st st(next next.binders, sub u.sub)
5922+ (infer-fragment val.arm [[one [head ~]] [two [tail ~]] env] st(next (add 2 next.st), sub u.sub))
8784− ?~ expected (infer-fragment val.arm env.binders st)
8785− =/ body=iresult (infer-call-context-arg val.arm typ.u.expected env.binders st context.u.expected)
8786− ?: ?=(%| -.body) body
8787− =/ fit=ifit (itype-fit typ.p.body typ.u.expected sub.state.p.body next.state.p.body)
8788− ?: ?=(%unknown -.fit) [%| ["cell branch result constraint is not supported by partial inference" ~]]
8789− ?: ?=(%bad -.fit) [%| ["cell branch arm does not fit its expected type" ~[[context.u.expected "expected type"] [(span-of val.arm) "branch arm"]]]]
8790− ?: (itype-has-tag (itype-normalize typ.u.expected sub.fit))
8791− [%| ["cell branch result needs context in partial inference" ~]]
8792− [%& typ.u.expected state.p.body(sub sub.fit, next next.fit)]
8793::
5923::
8794++ show-itype
5924++ show-itype
8795 |= [t=itype sub=isub]
5925 |= [t=itype sub=isub]
@@ -8802,30 +5932,17 @@
8802 %avar
5932 %avar
8803 ?: (lth id.t 26) [(add 65 id.t) ~]
5933 ?: (lth id.t 26) [(add 65 id.t) ~]
8804 "T{<id.t>}"
5934 "T{<id.t>}"
8805− %rvar
8806− ?: (lth id.t 26) [(add 65 id.t) ~]
8807− "T{<id.t>}"
8808 %nvar
5935 %nvar
8809 ?: (lth id.t 26) [(add 65 id.t) ~]
5936 ?: (lth id.t 26) [(add 65 id.t) ~]
8810 "T{<id.t>}"
5937 "T{<id.t>}"
8811− %rnvar
8812− ?: (lth id.t 26) [(add 65 id.t) ~]
8813− "T{<id.t>}"
8814 %atom "@{(trip aura.t)}"
5938 %atom "@{(trip aura.t)}"
8815 %any-atom "@"
5939 %any-atom "@"
8816 %flag "?"
5940 %flag "?"
8817− %noun "*"
8818 %tag (trip txt.literal.t)
5941 %tag (trip txt.literal.t)
8819 %const (trip txt.literal.t)
5942 %const (trip txt.literal.t)
8820− %union
5943+ %union "<union>"
8821− ?~ label.t (show-itype-cases cases.t sub)
8822− ?~ args.t (trip u.label.t)
8823− "({(trip u.label.t)} {(show-itype-cases args.t sub)})"
8824− %recursive ?~(label.t "recursive mold" (trip u.label.t))
8825− %jrec ?~(label.t "recursive mold" (trip u.label.t))
8826− %collection "({(trip name.t)} {(show-itype-cases args.t sub)})"
8827− %face "[{(trip name.t)}={(show-itype-context body.t sub)}]"
5944+ %face "[{(trip name.t)}={$(t body.t)}]"
8828− %fn "$-({(show-itype-context sample.t sub)} {(show-itype-context product.t sub)})"
5945+ %fn "$-({$(t sample.t)} {$(t product.t)})"
8829 %cell "[{(show-itype-item hed.t sub)} {(show-itype-item tal.t sub)}]"
5946 %cell "[{(show-itype-item hed.t sub)} {(show-itype-item tal.t sub)}]"
8830 ==
5947 ==
8831::
5948::
@@ -8833,23 +5950,9 @@
8833 |= [t=itype sub=isub]
5950 |= [t=itype sub=isub]
8834 ^- tape
5951 ^- tape
8835 =. t (itype-walk t sub)
5952 =. t (itype-walk t sub)
8836− ?: ?=(%face -.t) "{(trip name.t)}={(show-itype-context body.t sub)}"
5953+ ?: ?=(%face -.t) "{(trip name.t)}={(show-itype body.t sub)}"
8837− (show-itype-context t sub)
8838−::
8839−++ show-itype-context
8840− |= [t=itype sub=isub]
8841− ^- tape
8842− =. t (itype-walk t sub)
8843− ?: &(?=(%union -.t) ?=(~ label.t)) "({(show-itype t sub)})"
8844 (show-itype t sub)
5954 (show-itype t sub)
8845::
5955::
8846−++ show-itype-cases
8847− |= [cases=(list itype) sub=isub]
8848− ^- tape
8849− ?~ cases ""
8850− ?~ t.cases (show-itype-context i.cases sub)
8851− "{(show-itype-context i.cases sub)} {$(cases t.cases)}"
8852−::
8853:: Include the type at a conflicting site where it can be printed.
5956:: Include the type at a conflicting site where it can be printed.
8854:: A lone unresolved variable or decimal variable keeps the neutral label.
5957:: A lone unresolved variable or decimal variable keeps the neutral label.
8855::
5958::
@@ -8858,20 +5961,14 @@
8858 ^- ?
5961 ^- ?
8859 ?- -.typ
5962 ?- -.typ
8860 %nvar &
5963 %nvar &
8861− %rnvar &
8862 %var |
5964 %var |
8863 %avar |
5965 %avar |
8864− %rvar |
8865 %atom |
5966 %atom |
8866 %any-atom |
5967 %any-atom |
8867 %flag |
5968 %flag |
8868− %noun |
8869 %tag |
5969 %tag |
8870 %const |
5970 %const |
8871− %union |((lien cases.typ |=(c=itype (itype-has-nvar c))) (lien args.typ |=(c=itype (itype-has-nvar c))))
5971+ %union (lien cases.typ |=(c=itype (itype-has-nvar c)))
8872− %recursive |
8873− %jrec |
8874− %collection (lien args.typ |=(c=itype (itype-has-nvar c)))
8875 %face $(typ body.typ)
5972 %face $(typ body.typ)
8876 %fn |($(typ sample.typ) $(typ product.typ))
5973 %fn |($(typ sample.typ) $(typ product.typ))
8877 %cell |($(typ hed.typ) $(typ tal.typ))
5974 %cell |($(typ hed.typ) $(typ tal.typ))
@@ -8881,8 +5978,7 @@
8881 |= [label=tape typ=itype sub=isub]
5978 |= [label=tape typ=itype sub=isub]
8882 ^- tape
5979 ^- tape
8883 =/ normalized=itype (itype-normalize typ sub)
5980 =/ normalized=itype (itype-normalize typ sub)
8884− ?: |(?=(%var -.normalized) ?=(%avar -.normalized) ?=(%rvar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
5981+ ?: |(?=(%var -.normalized) ?=(%avar -.normalized) (itype-has-nvar normalized) (itype-has-tag normalized) (itype-has-union normalized)) label
8885− ?: (itype-has-hidden-recursive normalized) label
8886 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
5982 =/ vars=(list @ud) (unique-type-vars (itype-vars normalized))
8887 ?: (gth (lent vars) 26) label
5983 ?: (gth (lent vars) 26) label
8888 =/ printable=itype (canonical-itype normalized vars)
5984 =/ printable=itype (canonical-itype normalized vars)
@@ -8891,68 +5987,13 @@
8891:: A capital in a written mold is generalized with its enclosing ++.
5987:: A capital in a written mold is generalized with its enclosing ++.
8892:: Atom constraints may remain generic; until full rigidity checking
5988:: Atom constraints may remain generic; until full rigidity checking
8893:: is implemented, do not report a type if one became more specific.
5989:: is implemented, do not report a type if one became more specific.
8894−:: Distinct written capitals cannot be forced equal; use the same
8895−:: capital where a type must be shared (Decisions 2026-10-30).
8896−::
8897−++ cap-id-in
8898− |= [n=@ud caps=icaps sub=isub]
8899− ^- ?
8900− ?~ caps |
8901− =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8902− =/ ident=(unit @ud)
8903− ?+ -.resolved ~
8904− %var `id.resolved
8905− %avar `id.resolved
8906− %rvar `id.resolved
8907− ==
8908− ?~ ident $(caps t.caps)
8909− ?: =(n u.ident) &
8910− $(caps t.caps)
8911−::
8912−++ cap-with-id
8913− |= [n=@ud caps=icaps sub=isub]
8914− ^- (unit icap)
8915− ?~ caps ~
8916− =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8917− =/ ident=(unit @ud)
8918− ?+ -.resolved ~
8919− %var `id.resolved
8920− %avar `id.resolved
8921− %rvar `id.resolved
8922− ==
8923− ?~ ident $(caps t.caps)
8924− ?: =(n u.ident) `i.caps
8925− $(caps t.caps)
8926−::
8927−++ merged-capitals
8928− |= [caps=icaps sub=isub]
8929− ^- (unit [first=icap second=icap])
8930− ?~ caps ~
8931− =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8932− =/ ident=(unit @ud)
8933− ?+ -.resolved ~
8934− %var `id.resolved
8935− %avar `id.resolved
8936− %rvar `id.resolved
8937− ==
8938− ?~ ident $(caps t.caps)
8939− =/ found=(unit icap) (cap-with-id u.ident t.caps sub)
8940− ?^ found `[u.found i.caps]
8941− $(caps t.caps)
8942::
5990::
8943++ constrained-capitals
5991++ constrained-capitals
8944 |= [caps=icaps sub=isub]
5992 |= [caps=icaps sub=isub]
8945 ^- ?
5993 ^- ?
8946 ?~ caps |
5994 ?~ caps |
8947 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
5995 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8948− =/ ident=(unit @ud)
8949− ?+ -.resolved ~
8950− %var `id.resolved
5996+ ?. |(?=(%var -.resolved) ?=(%avar -.resolved)) &
8951− %avar `id.resolved
8952− %rvar `id.resolved
8953− ==
8954− ?~ ident &
8955− ?: (cap-id-in u.ident t.caps sub) &
8956 $(caps t.caps)
5997 $(caps t.caps)
8957::
5998::
8958:: An atom variable may be generalized when an explicit capital, sample
5999:: An atom variable may be generalized when an explicit capital, sample
@@ -8964,8 +6005,8 @@
8964 ^- ?
6005 ^- ?
8965 ?~ caps |
6006 ?~ caps |
8966 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
6007 =/ resolved=itype (itype-walk [%var id.i.caps] sub)
8967− ?: |(?=(%avar -.resolved) ?=(%rvar -.resolved))
6008+ ?: ?=(%avar -.resolved)
8968− ?: =(n +.resolved) &
6009+ ?: =(n id.resolved) &
8969 $(caps t.caps)
6010 $(caps t.caps)
8970 $(caps t.caps)
6011 $(caps t.caps)
8971::
6012::
@@ -8975,19 +6016,13 @@
8975 ?- -.t
6016 ?- -.t
8976 %var |
6017 %var |
8977 %avar =(n id.t)
6018 %avar =(n id.t)
8978− %rvar =(n id.t)
8979 %nvar |
6019 %nvar |
8980− %rnvar |
8981 %atom |
6020 %atom |
8982 %any-atom |
6021 %any-atom |
8983 %flag |
6022 %flag |
8984− %noun |
8985 %tag |
6023 %tag |
8986 %const |
6024 %const |
8987− %union |((lien cases.t |=(c=itype (has-atom-var n c))) (lien args.t |=(c=itype (has-atom-var n c))))
6025+ %union (lien cases.t |=(c=itype (has-atom-var n c)))
8988− %recursive |
8989− %jrec |
8990− %collection (lien args.t |=(c=itype (has-atom-var n c)))
8991 %face $(t body.t)
6026 %face $(t body.t)
8992 %fn |($(t sample.t) $(t product.t))
6027 %fn |($(t sample.t) $(t product.t))
8993 %cell |($(t hed.t) $(t tal.t))
6028 %cell |($(t hed.t) $(t tal.t))
@@ -9026,10 +6061,6 @@
9026 =/ out=tape ""
6061 =/ out=tape ""
9027 |-
6062 |-
9028 ?~ vars out
6063 ?~ vars out
9029− ?: (itype-var-is-restricted i.vars t)
9030− =/ sep=tape ?:(printed ", " " where ")
9031− =/ clause=tape "{sep}{(show-itype [%rvar i.vars] ~)} is an atom other than ?"
9032− $(vars t.vars, printed &, out (weld out clause))
9033 ?: (itype-var-is-atom i.vars t)
6064 ?: (itype-var-is-atom i.vars t)
9034 =/ sep=tape ?:(printed ", " " where ")
6065 =/ sep=tape ?:(printed ", " " where ")
9035 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
6066 =/ clause=tape "{sep}{(show-itype [%avar i.vars] ~)} is an atom"
@@ -9038,9 +6069,9 @@
9038::
6069::
9039:: Build the supported part of the value environment in dependency order.
6070:: Build the supported part of the value environment in dependency order.
9040:: Each pass adds successful definitions. Forward references become
6071:: Each pass adds successful definitions. Forward references become
9041−:: available on a later pass; unsupported syntax does not enter the
6072+:: available on a later pass; recursive groups and unsupported syntax do
9042−:: environment. Generalized definitions are closed, so a use instantiates
6073+:: not enter the environment. Generalized definitions are closed, so a
9043−:: its variables afresh.
6074+:: use instantiates its variables afresh.
9044::
6075::
9045++ global-value-names
6076++ global-value-names
9046 |= ds=(list def)
6077 |= ds=(list def)
@@ -9058,619 +6089,32 @@
9058 ?~ t.hits &
6089 ?~ t.hits &
9059 |
6090 |
9060::
6091::
9061−:: A top-level gate may refer to itself through one monomorphic placeholder.
9062−:: Its declared sample is inferred first and preserves its field faces.
9063−:: Unify the completed body with that placeholder before generalization;
9064−:: reporting repeats the same check instead of instantiating the gate's
9065−:: generalized interface inside its own body. Mutual groups stay unsupported.
9066−::
9067−++ direct-self-call
9068− |= [e=expr name=term]
9069− ^- ?
9070− ?: ?=(%group -.e) $(e inner.e)
9071− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9072− ?. ?=(%call -.e) |
9073− ?. ?=(%wing -.head.e) |
9074− =(names.head.e ~[name])
9075−::
9076−++ branch-base-arm
9077− |= [e=expr name=term]
9078− ^- (unit expr)
9079− ?: ?=(%group -.e) $(e inner.e)
9080− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9081− ?. ?=(%branch -.e) ~
9082− ?~ arms.e ~
9083− ?~ t.arms.e ~
9084− ?^ t.t.arms.e ~
9085− =/ x=arm i.arms.e
9086− =/ y=arm i.t.arms.e
9087− ?. &(?=(%lit -.pat.x) ?=(%lit -.pat.y)) ~
9088− ?. &(=(%loobean form.lit.pat.x) =(%loobean form.lit.pat.y)) ~
9089− ?: =(val.lit.pat.x val.lit.pat.y) ~
9090− =/ first=? (direct-self-call val.x name)
9091− =/ second=? (direct-self-call val.y name)
9092− ?: =(first second) ~
9093− `?:(first val.y val.x)
9094−::
9095−:: Infer the base arm independently, with the self binding removed. Only
9096−:: a closed type whose constraints resolved can seed the recursive result.
9097−:: The regular body inference then checks both arms with shared state.
9098−::
9099−++ recursive-branch-seed
9100− |= [d=def env=ienv state=istate]
9101− ^- (unit itype)
9102− ?. ?=(%value -.d) ~
9103− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d)) ~
9104− =/ gate=expr val.d
9105− =/ body=expr
9106− ?- -.gate
9107− %gate body.gate
9108− %gate-wide body.gate
9109− * !!
9110− ==
9111− =/ base=(unit expr) (branch-base-arm body name.d)
9112− ?~ base ~
9113− =/ outer=ienv (skim env |=(entry=[name=term scheme=ischeme] !=(name.entry name.d)))
9114− =/ sam=isample-result
9115− ?- -.gate
9116− %gate (infer-sample sample.gate outer state)
9117− %gate-wide (infer-sample sample.gate outer state)
9118− * !!
9119− ==
9120− ?: ?=(%| -.sam) ~
9121− =/ inferred=iresult (infer-fragment u.base env.p.sam state.p.sam)
9122− ?: ?=(%| -.inferred) ~
9123− ?: (pending-tags tags.state.p.inferred sub.state.p.inferred) ~
9124− ?: (constrained-capitals caps.state.p.inferred sub.state.p.inferred) ~
9125− =/ typ=itype (itype-normalize typ.p.inferred sub.state.p.inferred)
9126− ?: ?=(^ (itype-vars typ)) ~
9127− ?: (itype-has-tag typ) ~
9128− `typ
9129−::
9130−++ infer-recursive-gate
9131− |= [d=def env=ienv state=istate]
9132− ^- iresult
9133− ?. ?=(%value -.d) [%| ["recursive definition is not a gate" ~]]
9134− ?. |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
9135− [%| ["recursive definition is not a gate" ~]]
9136− =/ result=(unit itype) (recursive-branch-seed d env state)
9137− =/ gate=expr val.d
9138− =/ sam=isample-result
9139− ?- -.gate
9140− %gate (infer-sample sample.gate env state)
9141− %gate-wide (infer-sample sample.gate env state)
9142− * !!
9143− ==
9144− ?: ?=(%| -.sam)
9145− =/ diag=(unit idiag)
9146− ?- -.gate
9147− %gate (sample-import-invalid sample.gate env state)
9148− %gate-wide (sample-import-invalid sample.gate env state)
9149− * ~
9150− ==
9151− ?: &(=(p.sam "sample mold is not supported by partial inference") ?=(^ diag)) [%| u.diag]
9152− [%| [p.sam ~]]
9153− =/ id=@ud next.state.p.sam
9154− =/ product=itype ?~(result [%var id] u.result)
9155− =/ st=istate state.p.sam(next +(id))
9156− =/ seed=itype [%fn typ.p.sam product]
9157− =/ seeded=ienv [[name.d [seed ~]] env.p.sam]
9158− =/ body=expr
9159− ?- -.gate
9160− %gate body.gate
9161− %gate-wide body.gate
9162− * !!
9163− ==
9164− =/ out=iresult (infer-fragment body seeded st)
9165− ?: ?=(%| -.out) out
9166− =/ uni=(unit isub) (itype-unify product typ.p.out sub.state.p.out)
9167− ?~ uni [%| ["recursive gate constraint is not supported by partial inference" ~]]
9168− [%& [%fn typ.p.sam typ.p.out] state.p.out(sub u.uni)]
9169−::
9170−++ dependency-root
9171− |= names=(list term)
9172− ^- (list term)
9173− ?~ names ~
9174− ~[(rear names)]
9175−::
9176−++ dependency-exprs
9177− |= xs=(list expr)
9178− ^- (list term)
9179− ?~ xs ~
9180− =/ first=(list term) (dependency-expr i.xs)
9181− (weld first $(xs t.xs))
9182−::
9183−++ dependency-pieces
9184− |= xs=(list piece)
9185− ^- (list term)
9186− ?~ xs ~
9187− =/ first=(list term)
9188− ?- -.i.xs
9189− %expr (dependency-expr p.i.xs)
9190− %text ~
9191− ==
9192− (weld first $(xs t.xs))
9193−::
9194−++ dependency-qsegs
9195− |= xs=(list qseg)
9196− ^- (list term)
9197− ?~ xs ~
9198− =/ first=(list term)
9199− ?- -.i.xs
9200− %expr (dependency-expr p.i.xs)
9201− %knot ~
9202− ==
9203− (weld first $(xs t.xs))
9204−::
9205−++ dependency-items
9206− |= xs=(list item)
9207− ^- (list term)
9208− ?~ xs ~
9209− =/ first=(list term) (dependency-expr val.i.xs)
9210− (weld first $(xs t.xs))
9211−::
9212−++ dependency-edits
9213− |= xs=(list edit)
9214− ^- (list term)
9215− ?~ xs ~
9216− =/ first=(list term) (dependency-expr val.i.xs)
9217− (weld first $(xs t.xs))
9218−::
9219−++ dependency-arms
9220− |= xs=(list arm)
9221− ^- (list term)
9222− ?~ xs ~
9223− =/ first=(list term) (dependency-expr val.i.xs)
9224− (weld first $(xs t.xs))
9225−::
9226−++ dependency-defs
9227− |= xs=(list def)
9228− ^- (list term)
9229− ?~ xs ~
9230− =/ first=(list term)
9231− ?: ?=(%value -.i.xs) (dependency-expr val.i.xs)
9232− ~
9233− (weld first $(xs t.xs))
9234−::
9235−++ dependency-expr
9236− |= e=expr
9237− ^- (list term)
9238− ?- -.e
9239− %str (dependency-pieces pieces.e)
9240− %qath (dependency-qsegs segs.e)
9241− %wing (dependency-root names.e)
9242− %change
9243− =/ first=(list term) (dependency-root target.e)
9244− =/ last=(list term) (dependency-edits edits.e)
9245− (weld first last)
9246− %pair (dependency-expr val.e)
9247− %unit (dependency-expr val.e)
9248− %group (dependency-expr inner.e)
9249− %list (dependency-exprs items.e)
9250− %tuple (dependency-items items.e)
9251− %gate (dependency-expr body.e)
9252− %gate-wide (dependency-expr body.e)
9253− %call
9254− =/ first=(list term) (dependency-expr head.e)
9255− =/ last=(list term) (dependency-exprs args.e)
9256− (weld first last)
9257− %cast (dependency-expr val.e)
9258− %trace
9259− =/ first=(list term) (dependency-expr val.e)
9260− =/ last=(list term) (dependency-expr then.e)
9261− (weld first last)
9262− %branch
9263− =/ first=(list term) (dependency-expr subject.e)
9264− =/ last=(list term) (dependency-arms arms.e)
9265− (weld first last)
9266− %body
9267− =/ first=(list term) (dependency-defs defs.e)
9268− =/ last=(list term) (dependency-expr final.e)
9269− (weld first last)
9270− * ~
9271− ==
9272−::
9273−:: Infer a cyclic component with one monomorphic seed per gate. All members
9274−:: must succeed before any scheme is available; pending constraints and
9275−:: unresolved branch joins remain partial.
9276−+$ igate-entry [name=term typ=itype body=expr env=ienv caps=icaps]
9277−+$ igate-seeds (each [entries=(list igate-entry) state=istate] idiag)
9278−++ seed-gate-group
9279− |= [ds=(list def) env=ienv state=istate]
9280− ^- igate-seeds
9281− ?~ ds [%& [~ state]]
9282− =/ d=def i.ds
9283− ?. ?=(%value -.d) [%| ["recursive group contains a non-gate" ~]]
9284− =/ gate=expr val.d
9285− ?. |(?=(%gate -.gate) ?=(%gate-wide -.gate))
9286− [%| ["recursive group contains a non-gate" ~]]
9287− =/ initial=istate (reserve-def-caps gate state)
9288− =/ sam=isample-result
9289− ?- -.gate
9290− %gate (infer-sample sample.gate env initial)
9291− %gate-wide (infer-sample sample.gate env initial)
9292− * !!
9293− ==
9294− ?: ?=(%| -.sam) [%| [p.sam ~]]
9295− =/ body=expr
9296− ?- -.gate
9297− %gate body.gate
9298− %gate-wide body.gate
9299− * !!
9300− ==
9301− =/ seed=itype [%fn typ.p.sam [%var next.state.p.sam]]
9302− =/ entry=igate-entry [name.d seed body env.p.sam caps.state.p.sam]
9303− =/ after=istate state.p.sam(next +(next.state.p.sam), caps caps.state)
9304− =/ rest=igate-seeds $(ds t.ds, state after)
9305− ?: ?=(%| -.rest) rest
9306− [%& [[entry entries.p.rest] state.p.rest]]
9307−::
9308−++ group-seed-env
9309− |= [entries=(list igate-entry) env=ienv]
9310− ^- ienv
9311− ?~ entries env
9312− [[name.i.entries [typ.i.entries ~]] $(entries t.entries)]
9313−::
9314−++ infer-gate-group-bodies
9315− |= [entries=(list igate-entry) seeds=ienv state=istate]
9316− ^- igate-seeds
9317− ?~ entries [%& [~ state]]
9318− =/ entry=igate-entry i.entries
9319− ?> ?=(%fn -.typ.entry)
9320− =/ scope=ienv (weld seeds env.entry)
9321− =/ out=iresult (infer-fragment body.entry scope state(caps caps.entry))
9322− ?: ?=(%| -.out) out
9323− =/ uni=(unit isub) (itype-unify product.typ.entry typ.p.out sub.state.p.out)
9324− ?~ uni [%| ["recursive group constraint is not supported by partial inference" ~]]
9325− =. caps.entry caps.state.p.out
9326− =/ after=istate state.p.out(sub u.uni, caps caps.state)
9327− =/ rest=igate-seeds $(entries t.entries, state after)
9328− ?: ?=(%| -.rest) rest
9329− [%& [[entry entries.p.rest] state.p.rest]]
9330−::
9331−++ group-schemes
9332− |= [entries=(list igate-entry) env=ienv outer=istate state=istate]
9333− ^- (each ienv idiag)
9334− ?~ entries [%& ~]
9335− =/ entry=igate-entry i.entries
9336− =/ merged=(unit [first=icap second=icap]) (merged-capitals caps.entry sub.state)
9337− ?^ merged
9338− [%| ["distinct type variables must not be forced equal" ~[[at.first.u.merged "first type variable"] [at.second.u.merged "second type variable"]]]]
9339− ?: (constrained-capitals caps.entry sub.state)
9340− [%| ["explicit capital constraints are not supported by partial inference" ~]]
9341− =/ typ=itype (itype-normalize typ.entry sub.state)
9342− ?: (itype-has-nvar typ) [%| ["recursive group needs unsupported inference" ~]]
9343− ?: |((itype-has-tag typ) (itype-has-hidden-generic typ) (itype-has-hidden-recursive typ) (unsupported-atom-vars typ caps.entry binders.state sub.state))
9344− [%| ["recursive group needs unsupported inference" ~]]
9345− =/ free=(list @ud) (weld (free-env-vars env sub.state) (free-cap-vars caps.outer sub.state))
9346− =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9347− =. vars (skim vars |=(n=@ud !(lien free |=(f=@ud =(f n)))))
9348− ?: (gth (lent vars) 26) [%| ["recursive group needs too many type variables" ~]]
9349− =/ rest=(each ienv idiag) $(entries t.entries)
9350− ?: ?=(%| -.rest) rest
9351− [%& [[name.entry [typ vars]] p.rest]]
9352−::
9353−++ infer-gate-group
9354− |= [ds=(list def) env=ienv state=istate]
9355− ^- ilocal-result
9356− =/ names=(list term) (global-value-names ds)
9357− ?. (levy names |=(n=term (unique-value-name n names)))
9358− [%| ["recursive group contains duplicate names" ~]]
9359− ?: (lien names |=(n=term ?=(^ (ienv-lookup n env))))
9360− [%| ["recursive group shadows a name" ~]]
9361− =/ scoped=istate state(globals (weld names globals.state))
9362− =/ seeded=igate-seeds (seed-gate-group ds env scoped)
9363− ?: ?=(%| -.seeded) seeded
9364− =/ seeds=ienv (group-seed-env entries.p.seeded ~)
9365− =/ body=igate-seeds (infer-gate-group-bodies entries.p.seeded seeds state.p.seeded)
9366− ?: ?=(%| -.body) body
9367− :: Per-member ownership through mutual recursion is not implemented.
9368− ?: !=(projections.state.p.body projections.state)
9369− [%| ["record projection in recursive groups needs unsupported inference" ~]]
9370− ?: !=(holes.state.p.body holes.state)
9371− [%| ["holes in recursive groups need unsupported inference" ~]]
9372− ?: (pending-tags tags.state.p.body sub.state.p.body)
9373− [%| ["recursive group has unresolved literal constraints" ~]]
9374− =/ schemes=(each ienv idiag) (group-schemes entries.p.body env state state.p.body)
9375− ?: ?=(%| -.schemes) schemes
9376− [%& [(weld p.schemes env) state.p.body(globals globals.state)]]
9377−::
9378−++ width-finalize
9379− |= [ps=(list iwprojection) sub=isub visible=(list @ud)]
9380− ^- (unit (list iwprojection))
9381− ?~ ps `~
9382− ?: (lien t.ps |=(p=iwprojection =(at.p at.i.ps))) ~
9383− =/ src=itype (default-decimals (itype-normalize source.i.ps sub))
9384− =/ dst=itype (default-decimals (itype-normalize target.i.ps sub))
9385− ?: |((itype-has-nvar src) (itype-has-nvar dst) (itype-has-tag src) (itype-has-tag dst)) ~
9386− =/ vars=(list @ud) (weld (itype-vars src) (itype-vars dst))
9387− ?. (levy vars |=(n=@ud (lien visible |=(v=@ud =(n v))))) ~
9388− =/ rest=(unit (list iwprojection)) $(ps t.ps)
9389− ?~ rest ~
9390− =/ entry=iwprojection i.ps
9391− =. entry entry(source src, target dst)
9392− `[entry u.rest]
9393−::
9394++ add-supported-defs
6092++ add-supported-defs
9395− |= [ds=(list def) env=ienv molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile) artifacts=(list iwidth-definition)]
6093+ |= [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)]
9396− ^- [env=ienv artifacts=(list iwidth-definition)]
6094+ ^- ienv
9397− ?~ ds [env artifacts]
6095+ ?~ ds env
9398 =/ d=def i.ds
6096 =/ d=def i.ds
9399 ?: ?=(%mold -.d) $(ds t.ds)
6097 ?: ?=(%mold -.d) $(ds t.ds)
9400 ?. (unique-value-name name.d globals) $(ds t.ds)
6098 ?. (unique-value-name name.d globals) $(ds t.ds)
9401 ?^ (ienv-lookup name.d env) $(ds t.ds)
6099 ?^ (ienv-lookup name.d env) $(ds t.ds)
9402− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9403− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
6100+ =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ |])
9404− =. initial (reserve-def-caps val.d initial)
9405− =/ result=iresult (infer-fragment val.d env initial)
9406− =? result ?=(%| -.result) (infer-recursive-gate d env initial)
9407 ?: ?=(%| -.result) $(ds t.ds)
6101 ?: ?=(%| -.result) $(ds t.ds)
9408− =. state.p.result (promote-restricted-numbers state.p.result env)
9409− =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
9410− ?^ (unresolved-hole holes.state.p.result holes.initial state.p.result) $(ds t.ds)
9411 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
6102 ?: (constrained-capitals caps.state.p.result sub.state.p.result) $(ds t.ds)
9412 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
6103 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
9413 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
6104 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ)) $(ds t.ds)
9414 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
6105 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result) $(ds t.ds)
9415 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6106 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
9416 ?: (gth (lent vars) 26) $(ds t.ds)
6107 ?: (gth (lent vars) 26) $(ds t.ds)
9417− =/ finalized=(unit (list iwprojection))
9418− (width-finalize projections.state.p.result sub.state.p.result vars)
9419− ?~ finalized $(ds t.ds)
9420− =? artifacts ?=(^ u.finalized)
9421− [[name.d val.d typ sub.state.p.result (flop u.finalized)] artifacts]
9422 $(ds t.ds, env [[name.d [typ vars]] env])
6108 $(ds t.ds, env [[name.d [typ vars]] env])
9423::
6109::
9424−+$ iresolved [env=ienv grouped=(list term) artifacts=(list iwidth-definition)]
9425−+$ iadj (map term (list term))
9426−+$ ivisited (map term ?)
9427−+$ iwork (list [name=term done=?])
9428−+$ iwresult [seen=ivisited order=(list term)]
9429−+$ icresult [seen=ivisited component=(list term)]
9430−+$ icomponents (list (list term))
9431−++ graph-nameset
9432− |= [names=(list term) seen=ivisited]
9433− ^- ivisited
9434− ?~ names seen
9435− $(names t.names, seen (~(put by seen) i.names &))
9436−::
9437−++ graph-edges
9438− |= [name=term graph=iadj]
9439− ^- (list term)
9440− =/ found=(unit (list term)) (~(get by graph) name)
9441− ?~ found ~
9442− u.found
9443−::
9444−++ graph-make-forward
9445− |= [ds=(list def) names=ivisited graph=iadj]
9446− ^- iadj
9447− ?~ ds graph
9448− ?. ?=(%value -.i.ds) $(ds t.ds)
9449− =/ deps=(list term) (dependency-expr val.i.ds)
9450− =. deps (skim deps |=(n=term ?=(^ (~(get by names) n))))
9451− $(ds t.ds, graph (~(put by graph) name.i.ds deps))
9452−::
9453−++ graph-add-reverse
9454− |= [name=term edges=(list term) reverse=iadj]
9455− ^- iadj
9456− ?~ edges reverse
9457− =/ prior=(list term) (graph-edges i.edges reverse)
9458− $(edges t.edges, reverse (~(put by reverse) i.edges [name prior]))
9459−::
9460−++ graph-reverse
9461− |= [names=(list term) graph=iadj reverse=iadj]
9462− ^- iadj
9463− ?~ names reverse
9464− =. reverse (graph-add-reverse i.names (graph-edges i.names graph) reverse)
9465− $(names t.names)
9466−::
9467−++ graph-order
9468− |= [todo=iwork seen=ivisited order=(list term) graph=iadj]
9469− ^- iwresult
9470− ?~ todo [seen order]
9471− =/ event=[name=term done=?] i.todo
9472− ?: done.event $(todo t.todo, order [name.event order])
9473− ?: ?=(^ (~(get by seen) name.event)) $(todo t.todo)
9474− =. seen (~(put by seen) name.event &)
9475− =/ children=iwork (turn (graph-edges name.event graph) |=(n=term [n |]))
9476− $(todo (weld children [[name.event &] t.todo]))
9477−::
9478−++ graph-collect
9479− |= [todo=(list term) seen=ivisited component=(list term) graph=iadj]
9480− ^- icresult
9481− ?~ todo [seen component]
9482− ?: ?=(^ (~(get by seen) i.todo)) $(todo t.todo)
9483− =. seen (~(put by seen) i.todo &)
9484− $(todo (weld (graph-edges i.todo graph) t.todo), component [i.todo component])
9485−::
9486−++ graph-collect-all
9487− |= [order=(list term) seen=ivisited graph=iadj comps=icomponents]
9488− ^- icomponents
9489− ?~ order comps
9490− ?: ?=(^ (~(get by seen) i.order)) $(order t.order)
9491− =/ found=icresult (graph-collect ~[i.order] seen ~ graph)
9492− $(order t.order, seen seen.found, comps [component.found comps])
9493−::
9494−:: Two depth-first passes find components before group inference. Maps
9495−:: preserve the graph identity; duplicate global names fail closed.
9496−++ graph-components
9497− |= [ds=(list def) names=(list term)]
9498− ^- icomponents
9499− =/ nameset=ivisited ~
9500− =/ pending=(list term) names
9501− |-
9502− ?^ pending
9503− ?: ?=(^ (~(get by nameset) i.pending)) ~
9504− $(pending t.pending, nameset (~(put by nameset) i.pending &))
9505− =/ graph=iadj (graph-make-forward ds nameset ~)
9506− =/ reverse=iadj (graph-reverse names graph ~)
9507− =/ order=iwresult (graph-order (turn names |=(n=term [n |])) ~ ~ graph)
9508− (graph-collect-all order.order ~ reverse ~)
9509−::
9510−++ graph-cycle
9511− |= [component=(list term) graph=iadj]
9512− ^- ?
9513− ?~ component |
9514− ?^ t.component &
9515− (lien (graph-edges i.component graph) |=(x=term =(x i.component)))
9516−::
9517−++ add-groups
9518− |= [ds=(list def) components=icomponents graph=iadj env=ienv grouped=(list term) artifacts=(list iwidth-definition) state=istate]
9519− ^- iresolved
9520− ?~ components [env grouped artifacts]
9521− =/ component=(list term) i.components
9522− ?. (graph-cycle component graph) $(components t.components)
9523− ?: (lien component |=(n=term ?=(^ (ienv-lookup n env)))) $(components t.components)
9524− =/ members=(list def)
9525− %+ skim ds
9526− |= d=def
9527− &(?=(%value -.d) (lien component |=(n=term =(n name.d))))
9528− ?. =((lent members) (lent component)) $(components t.components)
9529− ?. (levy component |=(n=term (unique-value-name n globals.state))) $(components t.components)
9530− =/ result=ilocal-result (infer-gate-group members env state)
9531− ?: ?=(%| -.result) $(components t.components)
9532− $(components t.components, env env.p.result, grouped (weld component grouped))
9533−::
9534−++ resolve-groups
9535− |= [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)]
9536− ^- iresolved
9537− =/ env=ienv ~
9538− =/ grouped=(list term) ~
9539− =/ artifacts=(list iwidth-definition) ~
9540− =/ names=(list term) (global-value-names ds)
9541− =/ nameset=ivisited (graph-nameset names ~)
9542− =/ graph=iadj (graph-make-forward ds nameset ~)
9543− =/ components=icomponents (graph-components ds names)
9544− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
9545− |-
9546− =/ next=[env=ienv artifacts=(list iwidth-definition)]
9547− (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds at prelude artifacts)
9548− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | at top prelude ~ 256 ~]
9549− =/ out=iresolved (add-groups ds components graph env.next grouped artifacts.next initial)
9550− ?: =(env env.out) out
9551− $(env env.out, grouped grouped.out, artifacts artifacts.out)
9552−::
9553++ resolve-supported-defs
6110++ resolve-supported-defs
9554− |= [ds=(list def) molds=imolds globals=(list term) externals=iexternals surs=(list term) mark-externals=imark-externals marks=(list term) jimports=ijimports reserved-molds=(list term) at=path prelude=(unit ifile)]
6111+ |= [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)]
9555 ^- ienv
6112 ^- ienv
9556− env:(resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds at prelude)
6113+ =/ env=ienv ~
9557−::
9558−:: A diagnostic-only proof for a narrow syntactic value cycle. Every
9559−:: edge is an unqualified wing in a supported expression, and samples
9560−:: may not shadow global bindings. Unknown forms yield no conclusion.
9561−+$ icyclesite [name=term at=span]
9562−+$ icycle [name=term first=span next=span]
9563−++ cycle-sites-list
9564− |= [xs=(list expr) globals=(list term) locals=(list term)]
9565− ^- (unit (list icyclesite))
9566− ?~ xs `~
9567− =/ first=(unit (list icyclesite)) (cycle-sites i.xs globals locals)
9568− ?~ first ~
9569− =/ tail=(unit (list icyclesite)) $(xs t.xs)
9570− ?~ tail ~
9571− `(weld u.first u.tail)
9572−::
9573−++ cycle-sample-name
9574− |= [sam=sample globals=(list term) locals=(list term)]
9575− ^- (unit (unit term))
9576− ?- -.sam
9577− %bind
9578− ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9579− ``name.sam
9580− %face
9581− ?: (lien (weld globals locals) |=(n=term =(n name.sam))) ~
9582− ``name.sam
9583− %bare `~
9584− * ~
9585− ==
9586−::
9587−++ cycle-sites
9588− |= [e=expr globals=(list term) locals=(list term)]
9589− ^- (unit (list icyclesite))
9590− ?- -.e
9591− %wing
9592− ?. ?=([@ ~] names.e) ~
9593− `~[[i.names.e at.e]]
9594− %lit `~
9595− %str
9596− ?: (lien pieces.e |=(p=piece ?=(%expr -.p))) ~
9597− `~
9598− %group $(e inner.e)
9599− %body ?~(defs.e $(e final.e) ~)
9600− %cast $(e val.e)
9601− %gate
9602− =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
9603− ?~ binder ~
9604− =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
9605− $(e body.e, locals nested)
9606− %gate-wide
9607− =/ binder=(unit (unit term)) (cycle-sample-name sample.e globals locals)
9608− ?~ binder ~
9609− =/ nested=(list term) ?~(u.binder locals [u.u.binder locals])
9610− $(e body.e, locals nested)
9611− %call
9612− =/ first=(unit (list icyclesite)) $(e head.e)
9613− ?~ first ~
9614− =/ tail=(unit (list icyclesite)) (cycle-sites-list args.e globals locals)
9615− ?~ tail ~
9616− `(weld u.first u.tail)
9617− * ~
9618− ==
9619−::
9620−++ cycle-definitely-atom
9621− |= e=expr
9622− ^- ?
9623− ?: ?=(%group -.e) $(e inner.e)
9624− ?: &(?=(%body -.e) ?=(~ defs.e)) $(e final.e)
9625− ?. ?=(%cast -.e) |
9626− |(?=(%aura -.shape.e) ?=(%flag -.shape.e))
9627−::
9628−++ cycle-proof-group
9629− |= [members=(list def) globals=(list term)]
9630− ^- ?
9631− ?~ members &
9632− ?. ?=(%value -.i.members) |
9633− ?. (unique-value-name name.i.members globals) |
9634− ?. ?=(^ (cycle-sites val.i.members globals ~)) |
9635− $(members t.members)
9636−::
9637−++ cycle-find-site
9638− |= [sites=(list icyclesite) component=(list term)]
9639− ^- (unit span)
9640− ?~ sites ~
9641− ?: (lien component |=(n=term =(n name.i.sites))) `at.i.sites
9642− $(sites t.sites)
9643−::
9644−++ cycle-group-errors
9645− |= [members=(list def) component=(list term) globals=(list term)]
9646− ^- (list icycle)
9647− ?~ members ~
9648− =/ d=def i.members
9649− ?> ?=(%value -.d)
9650− =/ tail=(list icycle) $(members t.members)
9651− ?. (cycle-definitely-atom val.d) tail
9652− =/ sites=(unit (list icyclesite)) (cycle-sites val.d globals ~)
9653− ?~ sites tail
9654− =/ found=(unit span) (cycle-find-site u.sites component)
9655− ?~ found tail
9656− [[name.d at.d u.found] tail]
9657−::
9658−++ definite-value-cycles
9659− |= [ds=(list def) globals=(list term)]
9660− ^- (list icycle)
9661− =/ names=(list term) (global-value-names ds)
9662− =/ graph=iadj (graph-make-forward ds (graph-nameset names ~) ~)
9663− =/ components=icomponents (graph-components ds names)
9664− =/ out=(list icycle) ~
9665 |-
6114 |-
9666− ?~ components out
6115+ =/ next=ienv (add-supported-defs ds env molds globals externals surs mark-externals marks jimports reserved-molds)
9667− =/ component=(list term) i.components
6116+ ?: =(next env) env
9668− ?. (graph-cycle component graph) $(components t.components)
6117+ $(env next)
9669− =/ members=(list def)
9670− (skim ds |=(d=def &(?=(%value -.d) (lien component |=(n=term =(n name.d))))))
9671− ?. =((lent members) (lent component)) $(components t.components)
9672− ?. (cycle-proof-group members globals) $(components t.components)
9673− $(components t.components, out (weld (cycle-group-errors members component globals) out))
9674::
6118::
9675+| %union-analysis
6119+| %union-analysis
9676::
6120::
@@ -9807,142 +6251,11 @@
9807 [at.first at.second (union-relate a (project-union-mold second molds ~))]
6251 [at.first at.second (union-relate a (project-union-mold second molds ~))]
9808 (weld pairs $(cases t.cases))
6252 (weld pairs $(cases t.cases))
9809::
6253::
9810−:: A closed structural mold supplies no equation to determine a hole.
9811−:: Applications, references, unbound capitals and unions are unproved.
9812−++ simple-mold-hole
9813− |= sh=shape
9814− ^- (unit (unit span))
9815− ?: ?=(%generic -.sh)
9816− ?~ vars.sh ~
9817− ?. (distinct-params vars.sh) ~
9818− (simple-mold-hole-in body.sh vars.sh)
9819− (simple-mold-hole-in sh ~)
9820−++ simple-mold-hole-in
9821− |= [sh=shape vars=(list @t)]
9822− ^- (unit (unit span))
9823− ?- -.sh
9824− %hole ``at.sh
9825− ?(%aura %noun %void %flag %const) `~
9826− %tvar ?:((lien vars |=(v=@t =(v name.sh))) `~ ~)
9827− %cell (simple-mold-field-holes fields.sh vars)
9828− %fn
9829− =/ a=(unit (unit span)) $(sh sample.sh)
9830− ?~ a ~
9831− =/ b=(unit (unit span)) $(sh product.sh)
9832− ?~ b ~
9833− `?~(u.a u.b u.a)
9834− %generic ~
9835− * ~
9836− ==
9837−++ simple-mold-field-holes
9838− |= [fields=(list field) vars=(list @t)]
9839− ^- (unit (unit span))
9840− ?~ fields `~
9841− =/ f=field i.fields
9842− =/ first=(unit (unit span))
9843− ?- -.f
9844− %face (simple-mold-hole-in shape.f vars)
9845− %bare (simple-mold-hole-in shape.f vars)
9846− %pun ~
9847− ==
9848− ?~ first ~
9849− =/ rest=(unit (unit span)) $(fields t.fields)
9850− ?~ rest ~
9851− `?~(u.first u.rest u.first)
9852−++ simple-local-mold-hole
9853− |= defs=(list def)
9854− ^- (unit span)
9855− ?~ defs ~
9856− ?. ?=(%mold -.i.defs) $(defs t.defs)
9857− =/ found=(unit (unit span)) (simple-mold-hole shape.i.defs)
9858− ?~ found $(defs t.defs)
9859− ?^ u.found u.found
9860− $(defs t.defs)
9861−::
9862−:: A partial prelude may omit unsupported declarations, but may not
9863−:: publish an interface while a named mold's hole remains unchecked.
9864−++ shape-has-hole
9865− |= sh=shape
9866− ^- ?
9867− ?- -.sh
9868− %hole &
9869− %path (lien segs.sh |=(s=pseg ?=(%inferred -.s)))
9870− %apply (lien args.sh shape-has-hole)
9871− %union (lien cases.sh shape-has-hole)
9872− %cell (lien fields.sh field-has-hole)
9873− %fn |($(sh sample.sh) $(sh product.sh))
9874− %generic $(sh body.sh)
9875− * |
9876− ==
9877−++ field-has-hole
9878− |= f=field
9879− ^- ?
9880− ?- -.f
9881− %face (shape-has-hole shape.f)
9882− %bare (shape-has-hole shape.f)
9883− %pun |
9884− ==
9885−++ named-mold-has-hole
9886− |= ds=(list def)
9887− ^- ?
9888− ?~ ds |
9889− ?: &(?=(%mold -.i.ds) (shape-has-hole shape.i.ds)) &
9890− $(ds t.ds)
9891−::
9892−++ sample-has-hole
9893− |= sam=sample
9894− ^- ?
9895− ?- -.sam
9896− %face (shape-has-hole shape.sam)
9897− %bare (shape-has-hole shape.sam)
9898− %cell (lien items.sam sample-has-hole)
9899− * |
9900− ==
9901−++ def-has-hole
9902− |= d=def
9903− ^- ?
9904− ?- -.d
9905− %mold (shape-has-hole shape.d)
9906− %value (expr-has-hole val.d)
9907− ==
9908−++ expr-has-hole
9909− |= e=expr
9910− ^- ?
9911− ?- -.e
9912− %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9913− %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (expr-has-hole p.p) |)))
9914− %change (lien edits.e |=(p=edit (expr-has-hole val.p)))
9915− %pair $(e val.e)
9916− %unit $(e val.e)
9917− %group $(e inner.e)
9918− %list (lien items.e expr-has-hole)
9919− %tuple (lien items.e |=(i=item (expr-has-hole val.i)))
9920− ?(%gate %gate-wide) |((sample-has-hole sample.e) $(e body.e))
9921− %cast |((shape-has-hole shape.e) $(e val.e))
9922− %call |($(e head.e) (lien args.e expr-has-hole))
9923− %trace |($(e val.e) $(e then.e))
9924− %branch |($(e subject.e) (lien arms.e |=(a=arm (expr-has-hole val.a))))
9925− %body |((lien defs.e def-has-hole) $(e final.e))
9926− * |
9927− ==
9928−++ hole-values-present
9929− |= [ds=(list def) env=ienv]
9930− ^- ?
9931− ?~ ds &
9932− ?. ?=(%value -.i.ds) $(ds t.ds)
9933− ?: (expr-has-hole val.i.ds)
9934− ?. ?=(^ (ienv-lookup name.i.ds env)) |
9935− $(ds t.ds)
9936− $(ds t.ds)
9937++ show-partial-mold
6254++ show-partial-mold
9938 |= [file=path src=@t d=def molds=imolds]
6255 |= [file=path src=@t d=def molds=imolds]
9939 ^- @t
6256 ^- @t
9940 ?> ?=(%mold -.d)
6257 ?> ?=(%mold -.d)
9941 =/ sh=shape shape.d
6258 =/ sh=shape shape.d
9942− =/ hole=(unit (unit span)) (simple-mold-hole sh)
9943− ?: &(?=(^ hole) ?=(^ u.hole))
9944− =/ text=@t (show-error src [file line.beg.u.u.hole col.beg.u.u.hole "unresolved type hole"])
9945− (of-wain:format ~[(crip "+$ {(trip name.d)}: type hole needs a determined type") text])
9946 =? sh ?=(%generic -.sh) body.sh
6259 =? sh ?=(%generic -.sh) body.sh
9947 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
6260 ?. ?=(%union -.sh) (crip "+$ {(trip name.d)}: not checked")
9948 =/ pairs=(list upair) (union-pairs cases.sh molds)
6261 =/ pairs=(list upair) (union-pairs cases.sh molds)
@@ -9969,21 +6282,6 @@
9969 (show-error src [file line.beg.at.site col.beg.at.site note.site])
6282 (show-error src [file line.beg.at.site col.beg.at.site note.site])
9970 (of-wain:format [summary excerpts])
6283 (of-wain:format [summary excerpts])
9971::
6284::
9972−:: Both written field sites are shown in the source that declares them.
9973−++ show-duplicate-fields
9974− |= [file=path src=@t diagnostic=idiag]
9975− ^- @t
9976− =/ excerpts=(list @t)
9977− %+ turn sites.diagnostic
9978− |= site=[at=span note=tape]
9979− (show-error src [file line.beg.at.site col.beg.at.site note.site])
9980− (of-wain:format [(crip msg.diagnostic) excerpts])
9981−::
9982−++ duplicate-fields-report
9983− |= [file=path src=@t diagnostic=idiag]
9984− ^- @t
9985− (of-wain:format ~['partial inference; module not checked' (show-duplicate-fields file src diagnostic)])
9986−::
9987:: +golden-types: a partial report; it does not claim the module checks
6285:: +golden-types: a partial report; it does not claim the module checks
9988::
6286::
9989++ golden-types
6287++ golden-types
@@ -10013,180 +6311,6 @@
10013+$ jfile-result (each [iface=ifile cache=jcache] @t)
6311+$ jfile-result (each [iface=ifile cache=jcache] @t)
10014+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
6312+$ jimports-result (each [resolved=ijimports cache=jcache] @t)
10015::
6313::
10016−:: Written record fields each have their own lexical record scope.
10017−+$ written-fields (map term span)
10018−++ duplicate-written-field
10019− |= [name=term at=span seen=written-fields]
10020− ^- (unit idiag)
10021− =/ prior=(unit span) (~(get by seen) name)
10022− ?~ prior ~
10023− `["record field `{(trip name)}` is repeated" ~[[u.prior "first field"] [at "repeated field"]]]
10024−++ duplicate-shapes
10025− |= xs=(list shape)
10026− ^- (unit idiag)
10027− ?~ xs ~
10028− =/ first (duplicate-shape i.xs)
10029− ?^ first first
10030− $(xs t.xs)
10031−++ duplicate-fields
10032− |= [fields=(list field) seen=written-fields]
10033− ^- (unit idiag)
10034− ?~ fields ~
10035− =/ f=field i.fields
10036− =/ n=(unit term)
10037− ?- -.f
10038− %face `name.f
10039− %pun `name.f
10040− %bare ~
10041− ==
10042− =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.f seen))
10043− ?^ dup dup
10044− =/ inner=(unit idiag)
10045− ?- -.f
10046− %face (duplicate-shape shape.f)
10047− %pun ~
10048− %bare (duplicate-shape shape.f)
10049− ==
10050− ?^ inner inner
10051− $(fields t.fields, seen ?~(n seen (~(put by seen) u.n at.f)))
10052−++ duplicate-shape
10053− |= s=shape
10054− ^- (unit idiag)
10055− ?- -.s
10056− %cell (duplicate-fields fields.s ~)
10057− %apply (duplicate-shapes args.s)
10058− %union (duplicate-shapes cases.s)
10059− %fn
10060− =/ left (duplicate-shape sample.s)
10061− ?^ left left
10062− (duplicate-shape product.s)
10063− %generic (duplicate-shape body.s)
10064− * ~
10065− ==
10066−++ duplicate-samples
10067− |= [items=(list sample) seen=written-fields]
10068− ^- (unit idiag)
10069− ?~ items ~
10070− =/ a=sample i.items
10071− =/ n=(unit term)
10072− ?- -.a
10073− %bind `name.a
10074− %face `name.a
10075− %pun `name.a
10076− * ~
10077− ==
10078− =/ dup=(unit idiag) ?~(n ~ (duplicate-written-field u.n at.a seen))
10079− ?^ dup dup
10080− =/ inner (duplicate-sample a)
10081− ?^ inner inner
10082− $(items t.items, seen ?~(n seen (~(put by seen) u.n at.a)))
10083−++ duplicate-sample
10084− |= s=sample
10085− ^- (unit idiag)
10086− ?- -.s
10087− %cell (duplicate-samples items.s ~)
10088− %face (duplicate-shape shape.s)
10089− %bare (duplicate-shape shape.s)
10090− * ~
10091− ==
10092−++ duplicate-exprs
10093− |= xs=(list expr)
10094− ^- (unit idiag)
10095− ?~ xs ~
10096− =/ first (duplicate-expr i.xs)
10097− ?^ first first
10098− $(xs t.xs)
10099−++ duplicate-items
10100− |= [items=(list item) seen=written-fields]
10101− ^- (unit idiag)
10102− ?~ items ~
10103− =/ a=item i.items
10104− =/ dup=(unit idiag) ?~(face.a ~ (duplicate-written-field u.face.a at.a seen))
10105− ?^ dup dup
10106− =/ inner (duplicate-expr val.a)
10107− ?^ inner inner
10108− $(items t.items, seen ?~(face.a seen (~(put by seen) u.face.a at.a)))
10109−++ duplicate-pieces
10110− |= pieces=(list piece)
10111− ^- (unit idiag)
10112− ?~ pieces ~
10113− =/ first=(unit idiag) ?:(?=(%expr -.i.pieces) (duplicate-expr p.i.pieces) ~)
10114− ?^ first first
10115− $(pieces t.pieces)
10116−++ duplicate-qsegs
10117− |= segs=(list qseg)
10118− ^- (unit idiag)
10119− ?~ segs ~
10120− =/ first=(unit idiag) ?:(?=(%expr -.i.segs) (duplicate-expr p.i.segs) ~)
10121− ?^ first first
10122− $(segs t.segs)
10123−++ duplicate-edits
10124− |= edits=(list edit)
10125− ^- (unit idiag)
10126− ?~ edits ~
10127− =/ first (duplicate-expr val.i.edits)
10128− ?^ first first
10129− $(edits t.edits)
10130−++ duplicate-arms
10131− |= arms=(list arm)
10132− ^- (unit idiag)
10133− ?~ arms ~
10134− =/ first (duplicate-expr val.i.arms)
10135− ?^ first first
10136− $(arms t.arms)
10137−++ duplicate-defs
10138− |= defs=(list def)
10139− ^- (unit idiag)
10140− ?~ defs ~
10141− =/ first=(unit idiag)
10142− ?- -.i.defs
10143− %mold (duplicate-shape shape.i.defs)
10144− %value (duplicate-expr val.i.defs)
10145− ==
10146− ?^ first first
10147− $(defs t.defs)
10148−++ duplicate-expr
10149− |= e=expr
10150− ^- (unit idiag)
10151− ?- -.e
10152− %str (duplicate-pieces pieces.e)
10153− %qath (duplicate-qsegs segs.e)
10154− %change (duplicate-edits edits.e)
10155− %pair (duplicate-expr val.e)
10156− %unit (duplicate-expr val.e)
10157− %group (duplicate-expr inner.e)
10158− %list (duplicate-exprs items.e)
10159− %tuple (duplicate-items items.e ~)
10160− %gate-wide
10161− =/ first (duplicate-sample sample.e)
10162− ?^ first first
10163− (duplicate-expr body.e)
10164− %gate
10165− =/ first (duplicate-sample sample.e)
10166− ?^ first first
10167− (duplicate-expr body.e)
10168− %cast
10169− =/ first (duplicate-shape shape.e)
10170− ?^ first first
10171− (duplicate-expr val.e)
10172− %call
10173− =/ first (duplicate-expr head.e)
10174− ?^ first first
10175− (duplicate-exprs args.e)
10176− %trace
10177− =/ first (duplicate-expr val.e)
10178− ?^ first first
10179− (duplicate-expr then.e)
10180− %branch
10181− =/ first (duplicate-expr subject.e)
10182− ?^ first first
10183− (duplicate-arms arms.e)
10184− %body
10185− =/ first (duplicate-defs defs.e)
10186− ?^ first first
10187− (duplicate-expr final.e)
10188− * ~
10189− ==
10190++ import-binding-names
6314++ import-binding-names
10191 |= imports=(list import)
6315 |= imports=(list import)
10192 ^- (list term)
6316 ^- (list term)
@@ -10199,60 +6323,6 @@
10199 ==
6323 ==
10200 [n $(imports t.imports)]
6324 [n $(imports t.imports)]
10201::
6325::
10202−++ reserved-proj-sample
10203− |= sam=sample
10204− ^- ?
10205− ?- -.sam
10206− %bind =(name.sam %proj)
10207− %face =(name.sam %proj)
10208− %pun =(name.sam %proj)
10209− %cell (lien items.sam reserved-proj-sample)
10210− * |
10211− ==
10212−++ reserved-proj-pattern
10213− |= p=pattern
10214− ^- ?
10215− ?- -.p
10216− %bind =(name.p %proj)
10217− %cell (lien items.p reserved-proj-pattern)
10218− * |
10219− ==
10220−++ reserved-proj-def
10221− |= d=def
10222− ^- ?
10223− ?: =(name.d %proj) &
10224− ?: ?=(%value -.d) (reserved-proj-expr val.d)
10225− |
10226−++ reserved-proj-expr
10227− |= e=expr
10228− ^- ?
10229− ?- -.e
10230− %str (lien pieces.e |=(p=piece ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
10231− %qath (lien segs.e |=(p=qseg ?:(?=(%expr -.p) (reserved-proj-expr p.p) |)))
10232− %change (lien edits.e |=(p=edit (reserved-proj-expr val.p)))
10233− %pair $(e val.e)
10234− %unit $(e val.e)
10235− %group $(e inner.e)
10236− %list (lien items.e reserved-proj-expr)
10237− %tuple (lien items.e |=(i=item (reserved-proj-expr val.i)))
10238− ?(%gate %gate-wide) |((reserved-proj-sample sample.e) $(e body.e))
10239− %cast $(e val.e)
10240− %call |($(e head.e) (lien args.e reserved-proj-expr))
10241− %trace |($(e val.e) $(e then.e))
10242− %branch |($(e subject.e) (lien arms.e |=(a=arm |((reserved-proj-pattern pat.a) (reserved-proj-expr val.a)))))
10243− %body |((lien defs.e reserved-proj-def) $(e final.e))
10244− * |
10245− ==
10246−::
10247−++ module-has-reserved-proj
10248− |= mod=module
10249− ^- ?
10250− =/ imported=(list term) (import-binding-names imports.mod)
10251− =/ vals=(list term) (global-value-names defs.mod)
10252− =/ molds=imolds (collect-simple-molds defs.mod)
10253− =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10254− |((lien (weld imported (weld vals mold-names)) |=(n=term =(n %proj))) (lien defs.mod reserved-proj-def))
10255−::
10256++ module-scope-valid
6326++ module-scope-valid
10257 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
6327 |= [mod=module prelude-values=(list term) prelude-molds=(list term)]
10258 ^- ?
6328 ^- ?
@@ -10260,7 +6330,6 @@
10260 =/ vals=(list term) (global-value-names defs.mod)
6330 =/ vals=(list term) (global-value-names defs.mod)
10261 =/ molds=imolds (collect-simple-molds defs.mod)
6331 =/ molds=imolds (collect-simple-molds defs.mod)
10262 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
6332 =/ mold-names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10263− ?: (module-has-reserved-proj mod) |
10264 ?. %+ levy imported
6333 ?. %+ levy imported
10265 |= n=term
6334 |= n=term
10266 &((unique-value-name n imported) !(lien vals |=(v=term =(n v))) !(lien mold-names |=(m=term =(n m))) !(lien prelude-values |=(v=term =(n v))) !(lien prelude-molds |=(m=term =(n m))))
6335 &((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))))
@@ -10268,22 +6337,6 @@
10268 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
6337 ?. (levy vals |=(n=term &((unique-value-name n vals) !(lien prelude-values |=(v=term =(n v)))))) |
10269 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
6338 (levy mold-names |=(n=term &((unique-value-name n mold-names) !(lien prelude-molds |=(m=term =(n m))))))
10270::
6339::
10271−:: In an API file or before main's kind is known, a lone `+$ poke`
10272−:: may be a declaration rather than a mold that shadows the prelude. Do not call
10273−:: that one collision definite, and do not hide unrelated scope errors.
10274−++ pending-declared-poke
10275− |= [at=path mod=module prelude-values=(list term) prelude-molds=(list term)]
10276− ^- ?
10277− ?. (lien prelude-molds |=(n=term =(%poke n))) |
10278− ?. |(?=([%ui %api @ %jibb ~] at) (lien defs.mod |=(d=def &(?=(%value -.d) =(%main name.d))))) |
10279− =/ pokes=(list def)
10280− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
10281− ?~ pokes |
10282− ?^ t.pokes |
10283− =/ remaining=(list def)
10284− (skim defs.mod |=(d=def !&(?=(%mold -.d) =(%poke name.d))))
10285− (module-scope-valid mod(defs remaining) prelude-values prelude-molds)
10286−::
10287++ module-mold-types
6340++ module-mold-types
10288 |= [molds=imolds state=istate]
6341 |= [molds=imolds state=istate]
10289 ^- (each imold-types @t)
6342 ^- (each imold-types @t)
@@ -10292,260 +6345,10 @@
10292 =/ t=(unit [template=ischeme state=istate])
6345 =/ t=(unit [template=ischeme state=istate])
10293 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
6346 (infer-mold-template body.m state(active [name.m active.state], in-mold &))
10294 ?~ t [%| 'module mold needs unsupported inference']
6347 ?~ t [%| 'module mold needs unsupported inference']
10295− =. typ.template.u.t (label-direct-union typ.template.u.t body.m name.m state)
10296 =/ rest=(each imold-types @t) $(molds t.molds)
6348 =/ rest=(each imold-types @t) $(molds t.molds)
10297 ?: ?=(%| -.rest) rest
6349 ?: ?=(%| -.rest) rest
10298 [%& [[name.m template.u.t] p.rest]]
6350 [%& [[name.m template.u.t] p.rest]]
10299::
6351::
10300−:: Prepare a provisional interface from the trusted vendored source.
10301−:: Every declared name remains reserved, but only molds and values this
10302−:: fragment can infer are usable. Unsupported bodies are not validated.
10303−:: An optional internal source supplies the prelude's one supported import;
10304−:: clients cannot import that path directly. Named unions retain their origin.
10305−::
10306−:: Recognize only the complete standard prelude list shape. Its recursive
10307−:: tail uses the same parameter and the unqualified list name. The reader
10308−:: verifies Hoon's list provenance before producing the same collection type.
10309−:: The prelude source and reader output are trusted caller inputs.
10310−::
10311−++ standard-prelude-list
10312− |= sh=shape
10313− ^- ?
10314− ?. ?=(%generic -.sh) |
10315− ?~ vars.sh |
10316− ?^ t.vars.sh |
10317− =/ var=@t i.vars.sh
10318− ?. ?=(%union -.body.sh) |
10319− =/ cs=(list shape) cases.body.sh
10320− ?~ cs |
10321− ?~ t.cs |
10322− ?^ t.t.cs |
10323− ?. ?=(%const -.i.cs) |
10324− ?. =(%null form.lit.i.cs) |
10325− ?. ?=(%cell -.i.t.cs) |
10326− =/ fs=(list field) fields.i.t.cs
10327− ?~ fs |
10328− ?~ t.fs |
10329− ?^ t.t.fs |
10330− ?. ?=(%face -.i.fs) |
10331− ?. =(%i name.i.fs) |
10332− ?. ?=(%tvar -.shape.i.fs) |
10333− ?. =(var name.shape.i.fs) |
10334− ?. ?=(%face -.i.t.fs) |
10335− ?. =(%t name.i.t.fs) |
10336− =/ tail=shape shape.i.t.fs
10337− ?. ?=(%apply -.tail) |
10338− ?. =(~[%list] ref.tail) |
10339− ?~ args.tail |
10340− ?^ t.args.tail |
10341− ?. ?=(%tvar -.i.args.tail) |
10342− =(var name.i.args.tail)
10343−::
10344−++ prelude-label
10345− |= [typ=itype name=term vars=(list @ud)]
10346− ^- itype
10347− ?: ?=(%jrec -.typ) typ(label `name)
10348− ?. ?=(%union -.typ) typ
10349− ?. (identity-union-parameters vars args.typ)
10350− ?~ origin.typ typ
10351− ?: =(at.u.origin.typ /lib/jibb/internal/jibb) typ(label ~)
10352− typ
10353− typ(label `name)
10354−::
10355−++ partial-prelude-molds
10356− |= [molds=imolds state=istate]
10357− ^- imold-types
10358− ?~ molds ~
10359− =/ m=[name=term body=shape] i.molds
10360− ?: &(=(at.state /lib/jibb/prelude/jibb) =(%list name.m))
10361− ?. (standard-prelude-list body.m) $(molds t.molds)
10362− [[%list [[%collection %list ~[[%var 0]]] ~[0]]] $(molds t.molds)]
10363− =/ out=(unit [template=ischeme state=istate])
10364− (infer-mold-template body.m state(active [name.m active.state], in-mold &))
10365− ?~ out $(molds t.molds)
10366− =. typ.template.u.out (label-direct-union typ.template.u.out body.m name.m state)
10367− =. typ.template.u.out (prelude-label typ.template.u.out name.m vars.template.u.out)
10368− [[name.m template.u.out] $(molds t.molds)]
10369−::
10370−:: A compiler-owned interface available only to the dedicated
10371−:: internal-prelude preparation path, never the ordinary module resolver.
10372−++ private-primitive-interface
10373− ^- ifile
10374− =/ a=itype [%avar 0]
10375− =/ pair=itype [%cell a a]
10376− =/ b=itype [%rvar 0]
10377− =/ plus=ischeme [[%fn [%cell b b] b] ~[0]]
10378− =/ minus=ischeme [[%fn b b] ~[0]]
10379− =/ greater=ischeme [[%fn pair [%flag ~]] ~[0]]
10380− [~[[%raw-add plus] [%raw-dec minus] [%raw-gth greater]] ~ /lib/jibb/primitives/jibb ~ ~ ~ ~ ~]
10381−::
10382−++ infer-private-internal
10383− |= [src=@t public-source=@t]
10384− ^- (unit ifile)
10385− =/ at=path /lib/jibb/internal/jibb
10386− =/ parsed (parse at src)
10387− ?: ?=(%| -.parsed) ~
10388− =/ mod=module p.parsed
10389− ?^ (duplicate-defs defs.mod) ~
10390− ?~ imports.mod
10391− =/ built=jfile-result (infer-jibb-file at src ~ ~ ~ ~[at] ~ ~ ~ ~)
10392− ?: ?=(%| -.built) ~
10393− `iface.p.built
10394− ?. ?=([[%jibb *] ~] imports.mod) ~
10395− ?. =(path.i.imports.mod /lib/jibb/primitives) ~
10396− ?. (module-scope-valid mod ~ ~) ~
10397− =/ vals=(list term) (global-value-names defs.mod)
10398− ?: (lien vals |=(n=term =(n %main))) ~
10399− =/ molds=imolds (collect-simple-molds defs.mod)
10400− =/ globals=(list term) (weld (import-binding-names imports.mod) vals)
10401− :: The private source can use the public list and unit molds before the
10402− :: prelude is otherwise prepared. Re-read the trusted public source here
10403− :: and admit only its validated canonical templates; do not accept schemes
10404− :: supplied independently by the caller.
10405− =/ public=(each module error) (parse /lib/jibb/prelude/jibb public-source)
10406− ?: ?=(%| -.public) ~
10407− ?^ (duplicate-defs defs.p.public) ~
10408− ?. (module-scope-valid p.public ~ ~) ~
10409− =/ source-molds=imolds (collect-simple-molds defs.p.public)
10410− =/ written-list=(unit shape) (find-simple-mold %list source-molds)
10411− =/ source-list=(unit ischeme)
10412− ?~ written-list ~
10413− ?. (standard-prelude-list u.written-list) ~
10414− `[[%collection %list ~[[%var 0]]] ~[0]]
10415− :: Derive the public unit template from its actual source, then compare
10416− :: the complete nominal template before making it available privately.
10417− =/ unit-decl=(unit shape) (find-simple-mold %unit source-molds)
10418− =/ source-unit=(unit ischeme)
10419− ?~ unit-decl ~
10420− =/ unit-molds=imolds ~[[%unit u.unit-decl]]
10421− =/ unit-state=istate [0 ~ ~ ~ unit-molds ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | /lib/jibb/prelude/jibb ~[%unit] ~ ~ 256 ~]
10422− =/ unit-types=imold-types (partial-prelude-molds unit-molds unit-state)
10423− =/ unit-iface=ifile [~ unit-types /lib/jibb/prelude/jibb ~ ~ ~ ~ ~]
10424− =/ found=(unit ischeme) (find-jibb-mold %unit unit-iface)
10425− ?~ found ~
10426− ?. (standard-unit-template u.found /lib/jibb/prelude/jibb) ~
10427− found
10428− =/ primitive=ifile private-primitive-interface
10429− =? primitive ?=(^ source-list)
10430− primitive(molds [[%list u.source-list] molds.primitive])
10431− =? primitive ?=(^ source-unit)
10432− primitive(molds [[%unit u.source-unit] molds.primitive])
10433− =/ js=ijimports ~[[face.i.imports.mod primitive]]
10434− =/ reserved=(list term) ~[face.i.imports.mod]
10435− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10436− =/ state=istate [0 ~ ~ ~ molds globals ~ ~ ~ ~ js reserved ~ ~ ~ | at top ~ ~ 256 ~]
10437− =/ mts=(each imold-types @t) (module-mold-types molds state)
10438− =/ usable=(unit imold-types)
10439− ?: ?=(%& -.mts) `p.mts
10440− :: Missing public templates may make an unrelated internal mold
10441− :: unavailable. Validate all molds once with isolated canonical
10442− :: templates before admitting only those inferred using the actual
10443− :: source-backed templates. The proof interface is never exported.
10444− ?. |(?=(~ source-list) ?=(~ source-unit)) ~
10445− =/ nil=itype [%const [%null %n 0 '~']]
10446− =/ canonical-unit=ischeme
10447− [[%union ~[nil [%cell nil [%face %u [%var 0]]]] `[/lib/jibb/prelude/jibb %unit] `%unit ~[[%var 0]]] ~[0]]
10448− =/ canonical-list=ischeme [[%collection %list ~[[%var 0]]] ~[0]]
10449− =/ proof-primitive=ifile private-primitive-interface
10450− =. molds.proof-primitive ~[[%list canonical-list] [%unit canonical-unit]]
10451− =/ proof-imports=ijimports ~[[face.i.imports.mod proof-primitive]]
10452− =/ proof=(each imold-types @t) (module-mold-types molds state(jimports proof-imports))
10453− ?: ?=(%| -.proof) ~
10454− `(partial-prelude-molds molds state)
10455− ?~ usable ~
10456− =/ resolution=iresolved (resolve-groups defs.mod molds globals ~ ~ ~ ~ js reserved at ~)
10457− =/ env=ienv env.resolution
10458− ?. (module-values-complete defs.mod env) ~
10459− `[env u.usable at ~ artifacts.resolution ~ `src ~]
10460−::
10461−++ partial-prelude-interface-with-internal
10462− |= [src=@t internal-source=(unit @t)]
10463− ^- (unit ifile)
10464− ?: =(0 src) ~
10465− =/ at=path /lib/jibb/prelude/jibb
10466− =/ parsed (parse at src)
10467− ?: ?=(%| -.parsed) ~
10468− ?: (named-mold-has-hole defs.p.parsed) ~
10469− ?^ (duplicate-defs defs.p.parsed) ~
10470− =/ private=(unit ijimports)
10471− ?~ imports.p.parsed `~
10472− ?. ?=([[%jibb *] ~] imports.p.parsed) ~
10473− ?. =(path.i.imports.p.parsed /lib/jibb/internal) ~
10474− ?~ internal-source ~
10475− =/ built=(unit ifile) (infer-private-internal u.internal-source src)
10476− ?~ built ~
10477− `~[[face.i.imports.p.parsed u.built]]
10478− ?~ private ~
10479− ?~ defs.p.parsed ~
10480− ?. (module-scope-valid p.parsed ~ ~) ~
10481− =/ ds=(list def) defs.p.parsed
10482− =/ molds=imolds (collect-simple-molds ds)
10483− =/ names=(list term) (turn molds |=(m=[name=term body=shape] name.m))
10484− =/ globals=(list term) (weld (import-binding-names imports.p.parsed) (global-value-names ds))
10485− :: Remove raw list before inferring any template, so an altered list
10486− :: cannot leak through an alias. Its name remains reserved either way.
10487− =/ declared=? (lien names |=(name=term =(%list name)))
10488− =/ env-molds=imolds molds
10489− =? env-molds declared
10490− (skim molds |=(m=[name=term body=shape] !=(%list name.m)))
10491− =/ reserved=(list term) ?:(declared ~[%list] ~)
10492− =/ state=istate [0 ~ ~ ~ env-molds globals ~ ~ ~ ~ u.private reserved ~ ~ ~ | at names ~ ~ 256 ~]
10493− :: Other prelude molds may use list only after its source has passed
10494− :: the standard-list check. The raw declaration remains removed.
10495− =/ declared-list=(unit shape) (find-simple-mold %list molds)
10496− =/ mold-prelude=(unit ifile)
10497− ?~ declared-list ~
10498− ?. (standard-prelude-list u.declared-list) ~
10499− `[~ ~[[%list [[%collection %list ~[[%var 0]]] ~[0]]]] at ~ ~ ~ ~ ~]
10500− =/ mt=imold-types (partial-prelude-molds molds state(prelude mold-prelude))
10501− =/ partial=ifile [~ mt at ~ ~ ~ ~ ~]
10502− :: An explicitly qualified re-export must resolve. Other unsupported
10503− :: prelude declarations remain reserved but absent from the interface.
10504− =/ required=imolds
10505− %+ skim molds
10506− |= m=[name=term body=shape]
10507− =/ sh=shape body.m
10508− ?. ?=(%ref -.sh) |
10509− ?~ names.sh |
10510− ?=(^ t.names.sh)
10511− ?. (levy required |=(m=[name=term body=shape] ?=(^ (find-jibb-mold name.m partial)))) ~
10512− =/ resolution=iresolved (resolve-groups ds env-molds globals ~ ~ ~ ~ u.private reserved at `partial)
10513− =/ env=ienv env.resolution
10514− ?. (hole-values-present ds env) ~
10515− =/ deps=(list iwidth-dependency)
10516− ?~ u.private ~
10517− ~[[at.interface.i.u.private source.interface.i.u.private elaborations.interface.i.u.private]]
10518− `[env mt at ~ artifacts.resolution deps `src ~]
10519−::
10520−++ partial-prelude-interface
10521− |= src=@t
10522− ^- (unit ifile)
10523− (partial-prelude-interface-with-internal src ~)
10524−::
10525−+$ iprelude [iface=ifile values=(list term) molds=(list term)]
10526−::
10527−++ prepare-prelude
10528− |= src=@t
10529− ^- (unit iprelude)
10530− =/ iface=(unit ifile) (partial-prelude-interface src)
10531− ?~ iface ~
10532− =/ parsed (parse /lib/jibb/prelude/jibb src)
10533− ?: ?=(%| -.parsed) ~
10534− =/ vals=(list term) (global-value-names defs.p.parsed)
10535− =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10536− `[u.iface vals ms]
10537−::
10538−++ prepare-prelude-with-internal
10539− |= [src=@t internal-source=@t]
10540− ^- (unit iprelude)
10541− =/ iface=(unit ifile) (partial-prelude-interface-with-internal src `internal-source)
10542− ?~ iface ~
10543− =/ parsed (parse /lib/jibb/prelude/jibb src)
10544− ?: ?=(%| -.parsed) ~
10545− =/ vals=(list term) (global-value-names defs.p.parsed)
10546− =/ ms=(list term) (turn (collect-simple-molds defs.p.parsed) |=(m=[name=term body=shape] name.m))
10547− `[u.iface vals ms]
10548−::
10549++ module-values-complete
6352++ module-values-complete
10550 |= [ds=(list def) env=ienv]
6353 |= [ds=(list def) env=ienv]
10551 ^- ?
6354 ^- ?
@@ -10566,76 +6369,12 @@
10566 ?: =(at at.i.cache) `iface.i.cache
6369 ?: =(at at.i.cache) `iface.i.cache
10567 $(cache t.cache)
6370 $(cache t.cache)
10568::
6371::
10569−:: These certificates retain the complete checked source closure. The
10570−:: trusted host must supply the identical prepared prelude and reader nouns.
10571−:: Exact bundle equality binds all source paths and versions; the set
10572−:: retains transitive paths for active-cycle checks. Request-bearing graphs
10573−:: alone have a size limit; incompatible diamond evidence fails closed.
10574−++ request-graph-requests-add
10575− |= [pending=(list irequest-evidence) acc=(list irequest-evidence) fuel=@ud]
10576− ^- (unit (list irequest-evidence))
10577− ?~ pending `acc
10578− ?: =(0 fuel) ~
10579− =/ hit=(list irequest-evidence)
10580− (skim acc |=(x=irequest-evidence &(=(api-at.x api-at.i.pending) =(name.x name.i.pending))))
10581− ?^ hit
10582− ?. ?=([* ~] hit) ~
10583− ?. =(i.hit i.pending) ~
10584− $(pending t.pending, fuel (dec fuel))
10585− $(pending t.pending, acc [i.pending acc], fuel (dec fuel))
10586−++ request-graph-inputs-match
10587− |= [g=irequest-graph externals=iexternals marks=imark-externals modules=jbundle values=(list term) molds=(list term) prelude=(unit ifile)]
10588− ^- ?
10589− ?& =(bundle-input.g modules)
10590− =(prelude-input.g prelude)
10591− =(prelude-values.g values)
10592− =(prelude-molds.g molds)
10593− =(externals.g externals)
10594− =(marks.g marks)
10595− ==
10596−++ request-graph-merge
10597− |= [imports=ijimports g=irequest-graph fuel=@ud]
10598− ^- (unit irequest-graph)
10599− ?~ imports `g
10600− ?: =(0 fuel) ~
10601− =/ child=ifile interface.i.imports
10602− ?~ graph.child ~
10603− =/ cg=irequest-graph u.graph.child
10604− ?. ?& =(bundle-input.g bundle-input.cg)
10605− =(prelude-input.g prelude-input.cg)
10606− =(prelude-values.g prelude-values.cg)
10607− =(prelude-molds.g prelude-molds.cg)
10608− =(externals.g externals.cg)
10609− =(marks.g marks.cg)
10610− ==
10611− ~
10612− =/ merged=(set path) (~(uni in:..zuse paths.g) paths.cg)
10613− =/ rs=(unit (list irequest-evidence))
10614− (request-graph-requests-add requests.cg requests.g (add 1 (lent requests.cg)))
10615− ?~ rs ~
10616− ?: &(?=(^ u.rs) |((gth (lent ~(tap in:..zuse merged)) 256) (gth (lent u.rs) 256))) ~
10617− $(imports t.imports, g g(paths merged, requests u.rs), fuel (dec fuel))
10618−++ request-graph-reusable
10619− |= [f=ifile src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) values=(list term) molds=(list term) prelude=(unit ifile)]
10620− ^- ?
10621− ?~ source.f |
10622− ?. =(u.source.f src) |
10623− ?~ graph.f |
10624− =/ g=irequest-graph u.graph.f
10625− ?. (request-graph-inputs-match g externals marks modules values molds prelude) |
10626− ?. (~(has in:..zuse paths.g) at.f) |
10627− !(lien active |=(p=path (~(has in:..zuse paths.g) p)))
10628−::
10629++ resolve-jibb-imports
6372++ resolve-jibb-imports
10630− |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
6373+ |= [imports=(list import) externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache]
10631 ^- jimports-result
6374 ^- jimports-result
10632 ?~ imports [%& [~ cache]]
6375 ?~ imports [%& [~ cache]]
10633 ?. ?=(%jibb -.i.imports) $(imports t.imports)
6376 ?. ?=(%jibb -.i.imports) $(imports t.imports)
10634 =/ at=path (weld path.i.imports `path`~[%jibb])
6377 =/ at=path (weld path.i.imports `path`~[%jibb])
10635− ?: =(at /lib/jibb/internal/jibb)
10636− [%| 'the prelude internal module is private']
10637− ?: =(at /lib/jibb/primitives/jibb)
10638− [%| 'the prelude primitive interface is private']
10639 ?: (lien active |=(p=path =(p at)))
6378 ?: (lien active |=(p=path =(p at)))
10640 [%| (crip "import cycle at {(spud at)}")]
6379 [%| (crip "import cycle at {(spud at)}")]
10641 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
6380 =/ found=jbundle (skim modules |=(m=jsource =(at at.m)))
@@ -10643,863 +6382,38 @@
10643 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
6382 ?^ t.found [%| (crip "duplicate module sources: {(spud at)}")]
10644 =/ cached=(unit ifile) (find-jibb-cache at cache)
6383 =/ cached=(unit ifile) (find-jibb-cache at cache)
10645 =/ iface=jfile-result
6384 =/ iface=jfile-result
10646− ?^ cached
10647− ?. =(at.u.cached at) [%| 'cached module identity needs unsupported inference']
10648− ?~ graph.u.cached
10649− :: A detached legacy interface has unknown evidence. Rebuild it
10650− :: against the current graph, without retaining any stale entry.
10651− =/ clean=jcache (skim cache |=(x=[at=path iface=ifile] !=(at.x at)))
10652− (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds clean prelude)
10653− ?. (request-graph-reusable u.cached source.i.found externals mark-externals modules active prelude-values prelude-molds prelude)
10654− [%| 'cached module evidence needs unsupported inference']
10655− [%& [u.cached cache]]
6385+ ?^ cached [%& [u.cached cache]]
10656− (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache prelude)
6386+ (infer-jibb-file at source.i.found externals mark-externals modules [at active] prelude-values prelude-molds cache)
10657 ?: ?=(%| -.iface) [%| p.iface]
6387 ?: ?=(%| -.iface) [%| p.iface]
10658 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
6388 =/ rest=jimports-result $(imports t.imports, cache cache.p.iface)
10659 ?: ?=(%| -.rest) rest
6389 ?: ?=(%| -.rest) rest
10660 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
6390 [%& [[[face.i.imports iface.p.iface] resolved.p.rest] cache.p.rest]]
10661::
6391::
10662−:: Provisional declaration extraction only; this does not derive asks,
10663−:: validate imported types, or claim that an API module has checked.
10664−+$ iapi-path [at=span name=term segments=(list pseg) full=term diffs=(list term) scry=(unit (list pseg))]
10665−++ api-path-mark
10666− |= [sh=shape marks=(list term)]
10667− ^- (unit term)
10668− ?. ?=(%ref -.sh) ~
10669− ?. ?=([@ ~] names.sh) ~
10670− ?. (unique-value-name i.names.sh marks) ~
10671− `i.names.sh
10672−::
10673−++ api-path-diffs
10674− |= [shapes=(list shape) marks=(list term) used=(list term)]
10675− ^- (unit (list term))
10676− ?~ shapes `~
10677− =/ n=(unit term) (api-path-mark i.shapes marks)
10678− ?~ n ~
10679− ?: (lien used |=(x=term =(x u.n))) ~
10680− =/ rest=(unit (list term)) $(shapes t.shapes, used [u.n used])
10681− ?~ rest ~
10682− `[u.n u.rest]
10683−::
10684−++ api-path-payload
10685− |= [sh=shape marks=(list term)]
10686− ^- (unit [full=term diffs=(list term)])
10687− =/ direct=(unit term) (api-path-mark sh marks)
10688− ?^ direct `[u.direct ~]
10689− ?. ?=(%apply -.sh) ~
10690− ?. =(~[%facts] ref.sh) ~
10691− ?~ args.sh ~
10692− ?~ t.args.sh ~
10693− =/ full=(unit term) (api-path-mark i.args.sh marks)
10694− ?~ full ~
10695− =/ diffs=(unit (list term)) (api-path-diffs t.args.sh marks ~[u.full])
10696− ?~ diffs ~
10697− `[u.full u.diffs]
10698−::
10699−+$ iapi-parameter [name=term aura=@ta at=span]
10700−++ api-path-parameters
10701− |= [segments=(list pseg) seen=(list term)]
10702− ^- (unit (list iapi-parameter))
10703− ?~ segments `~
10704− ?: ?=(%knot -.i.segments) $(segments t.segments)
10705− =/ seg=pseg i.segments
10706− ?. ?=(%typed -.seg) ~
10707− ?: =(0 aura.seg) ~
10708− ?: (lien seen |=(n=term =(n name.seg))) ~
10709− =/ rest=(unit (list iapi-parameter)) $(segments t.segments, seen [name.seg seen])
10710− ?~ rest ~
10711− `[[name.seg aura.seg at.seg] u.rest]
10712−::
10713−++ api-scry-parameters-compatible
10714− |= [scry=(list iapi-parameter) watch=(list iapi-parameter)]
10715− ^- ?
10716− ?~ scry &
10717− ?. (lien watch |=(p=iapi-parameter &(=(name.p name.i.scry) =(aura.p aura.i.scry)))) |
10718− $(scry t.scry)
10719−::
10720−++ api-path-one
10721− |= [sh=shape marks=(list term)]
10722− ^- (unit iapi-path)
10723− ?. ?=(%cell -.sh) ~
10724− =/ fs=(list field) fields.sh
10725− ?~ fs ~
10726− ?~ t.fs ~
10727− ?~ t.t.fs ~
10728− ?: (gth (lent fs) 4) ~
10729− ?. ?=(%bare -.i.fs) ~
10730− =/ tag=shape shape.i.fs
10731− ?. ?=(%const -.tag) ~
10732− ?. =(%term form.lit.tag) ~
10733− =/ name=term val.lit.tag
10734− ?. (jibb-face-name name) ~
10735− ?. ?=(%bare -.i.t.fs) ~
10736− =/ path-shape=shape shape.i.t.fs
10737− ?. ?=(%path -.path-shape) ~
10738− ?. ?=(%bare -.i.t.t.fs) ~
10739− =/ payload=(unit [full=term diffs=(list term)]) (api-path-payload shape.i.t.t.fs marks)
10740− ?~ payload ~
10741− =/ scry=(unit (unit (list pseg)))
10742− ?~ t.t.t.fs `~
10743− =/ entry=field i.t.t.t.fs
10744− ?. ?=(%face -.entry) ~
10745− ?. =(%scry name.entry) ~
10746− ?. ?=(%path -.shape.entry) ~
10747− ``segs.shape.entry
10748− ?~ scry ~
10749− =/ params=(unit (list iapi-parameter)) (api-path-parameters segs.path-shape ~)
10750− ?~ params ~
10751− ?^ u.scry
10752− =/ scry-params=(unit (list iapi-parameter)) (api-path-parameters u.u.scry ~)
10753− ?~ scry-params ~
10754− ?. (api-scry-parameters-compatible u.scry-params u.params) ~
10755− `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
10756− `[at.sh name segs.path-shape full.u.payload diffs.u.payload u.scry]
10757−::
10758−++ api-path-many
10759− |= [shapes=(list shape) marks=(list term) seen=(list term)]
10760− ^- (unit (list iapi-path))
10761− ?~ shapes `~
10762− =/ one=(unit iapi-path) (api-path-one i.shapes marks)
10763− ?~ one ~
10764− ?: (lien seen |=(n=term =(n name.u.one))) ~
10765− =/ rest=(unit (list iapi-path)) $(shapes t.shapes, seen [name.u.one seen])
10766− ?~ rest ~
10767− `[u.one u.rest]
10768−::
10769−++ api-path-declaration
10770− |= [sh=shape marks=(list term)]
10771− ^- (unit (list iapi-path))
10772− ?: ?=(%union -.sh) (api-path-many cases.sh marks ~)
10773− (api-path-many ~[sh] marks ~)
10774−::
10775−:: Derived gates share the value namespace. /% marks name molds; /- and
10776−:: /= also introduce faces that cannot be shadowed by a derived value.
10777−++ api-import-faces
10778− |= imports=(list import)
10779− ^- (list term)
10780− ?~ imports ~
10781− ?- -.i.imports
10782− %mark $(imports t.imports)
10783− %sur [name.i.imports $(imports t.imports)]
10784− %jibb [face.i.imports $(imports t.imports)]
10785− ==
10786−::
10787−++ api-derived-names-valid
10788− |= [paths=(list iapi-path) poke-names=(list term) mod=module prelude-values=(list term)]
10789− ^- ?
10790− =/ path-names=(list term) (turn paths |=(p=iapi-path name.p))
10791− =/ derived=(list term) (weld path-names poke-names)
10792− ?: (lien derived |=(n=term =(n %proj))) |
10793− =/ outer=(list term) (weld prelude-values (weld (global-value-names defs.mod) (api-import-faces imports.mod)))
10794− (levy derived |=(n=term &((unique-value-name n derived) !(lien outer |=(x=term =(n x))))))
10795−::
10796−:: Analysis only. Successful external entries must be unchanged results
10797−:: produced for the declared marks; no request interface is produced.
10798−+$ iapi-mark-type [name=term typ=itype]
10799−+$ iapi-path-typed [path=iapi-path full=itype diffs=(list iapi-mark-type)]
10800−++ api-diff-types
10801− |= [names=(list term) externals=imark-externals declared=(list term)]
10802− ^- (unit (list iapi-mark-type))
10803− ?~ names `~
10804− =/ typ=(unit itype) (find-imported-mark i.names externals declared)
10805− ?~ typ ~
10806− =/ tail=(unit (list iapi-mark-type)) $(names t.names)
10807− ?~ tail ~
10808− `[[i.names u.typ] u.tail]
10809−::
10810−++ api-path-types
10811− |= [paths=(list iapi-path) externals=imark-externals declared=(list term)]
10812− ^- (unit (list iapi-path-typed))
10813− ?~ paths `~
10814− =/ full=(unit itype) (find-imported-mark full.i.paths externals declared)
10815− ?~ full ~
10816− =/ diffs=(unit (list iapi-mark-type)) (api-diff-types diffs.i.paths externals declared)
10817− ?~ diffs ~
10818− =/ tail=(unit (list iapi-path-typed)) $(paths t.paths)
10819− ?~ tail ~
10820− `[[i.paths u.full u.diffs] u.tail]
10821−::
10822−++ api-poke-mark-names
10823− |= [pokes=(list def) declared=(list term)]
10824− ^- (unit (list term))
10825− ?~ pokes `~
10826− ?^ t.pokes ~
10827− =/ d=def i.pokes
10828− ?. ?=(%mold -.d) ~
10829− =/ sh=shape shape.d
10830− ?: ?=(%union -.sh) (api-path-diffs cases.sh declared ~)
10831− =/ name=(unit term) (api-path-mark sh declared)
10832− ?~ name ~
10833− `~[u.name]
10834−::
10835−++ api-path-analysis
10836− |= [mod=module externals=imark-externals prelude-values=(list term) prelude-molds=(list term)]
10837− ^- (unit (list iapi-path-typed))
10838− ?: (lien defs.mod def-has-hole) ~
10839− ?^ (duplicate-defs defs.mod) ~
10840− =/ ds=(list def) defs.mod
10841− =/ declarations=(list def)
10842− (skim ds |=(d=def &(?=(%mold -.d) =(%paths name.d))))
10843− ?. ?=([* ~] declarations) ~
10844− =/ pokes=(list def)
10845− (skim ds |=(d=def &(?=(%mold -.d) =(%poke name.d))))
10846− ?: (gth (lent pokes) 1) ~
10847− =/ ordinary=(list def)
10848− (skim ds |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
10849− ?. (module-scope-valid mod(defs ordinary) prelude-values prelude-molds) ~
10850− =/ declared=(list term) (collect-mark-imports imports.mod)
10851− =/ poke-names=(unit (list term)) (api-poke-mark-names pokes declared)
10852− ?~ poke-names ~
10853− =/ decl=def i.declarations
10854− ?> ?=(%mold -.decl)
10855− =/ paths=(unit (list iapi-path)) (api-path-declaration shape.decl declared)
10856− ?~ paths ~
10857− ?. (api-derived-names-valid u.paths u.poke-names mod prelude-values) ~
10858− (api-path-types u.paths externals declared)
10859−::
10860−:: Source/graph entry for path analysis only. The returned paths retain
10861−:: reader-derived mark types and import resolution has checked reachable
10862−:: Jibb dependencies. This is not an API interface or a module check.
10863−++ api-path-analysis-source
10864− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10865− ^- (each (list iapi-path-typed) @t)
10866− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path analysis requires /ui/api/<agent>.jibb']
10867− =/ parsed (parse file src)
10868− ?: ?=(%| -.parsed) [%| 'API path source does not parse']
10869− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10870− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10871− ?~ prepared [%| 'API path analysis needs the prepared prelude']
10872− =/ prelude=(unit ifile) `iface.u.prepared
10873− =/ deps=jimports-result
10874− (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ prelude)
10875− ?: ?=(%| -.deps) [%| p.deps]
10876− =/ paths=(unit (list iapi-path-typed))
10877− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10878− ?~ paths [%| 'API path declaration needs unsupported analysis']
10879− [%& u.paths]
10880−::
10881−:: Analysis evidence retains the API source, the prepared interface, the
10882−:: caller's reader results and the resolved Jibb dependency cache alongside
10883−:: the typed path declarations. Reader results and prepared interfaces are
10884−:: trusted inputs: this does not verify their underlying Hoon source/version,
10885−:: create requests or check the provenance of arbitrary values.
10886−+$ iapi-path-evidence
10887− [at=path source=@t prepared=iprelude externals=iexternals marks=imark-externals dependencies=jcache paths=(list iapi-path-typed)]
10888−++ api-path-evidence-source
10889− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10890− ^- (each iapi-path-evidence @t)
10891− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
10892− =/ parsed (parse file src)
10893− ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
10894− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10895− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10896− ?~ prepared [%| 'API path evidence needs the prepared prelude']
10897− =/ public=ifile iface.u.prepared
10898− =/ deps=jimports-result
10899− (resolve-jibb-imports imports.p.parsed externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
10900− ?: ?=(%| -.deps) [%| p.deps]
10901− =/ paths=(unit (list iapi-path-typed))
10902− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10903− ?~ paths [%| 'API path declaration needs unsupported analysis']
10904− [%& [file src u.prepared externals marks cache.p.deps u.paths]]
10905−:: Graph-aware variant preserves the caller active stack and cache.
10906−++ api-path-evidence-graph
10907− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
10908− ^- (each iapi-path-evidence @t)
10909− ?~ active [%| 'API analysis needs an active graph']
10910− ?. =(i.active file) [%| 'API analysis active graph does not start at the source']
10911− ?: (lien t.active |=(p=path =(p file))) [%| 'API analysis active graph contains a cycle']
10912− ?. ?=([%ui %api @ %jibb ~] file) [%| 'API path evidence requires /ui/api/<agent>.jibb']
10913− =/ parsed (parse file src)
10914− ?: ?=(%| -.parsed) [%| 'API path evidence source does not parse']
10915− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
10916− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
10917− ?~ prepared [%| 'API path evidence needs the prepared prelude']
10918− =/ public=ifile iface.u.prepared
10919− =/ deps=jimports-result
10920− (resolve-jibb-imports imports.p.parsed externals marks modules active values.u.prepared molds.u.prepared cache `public)
10921− ?: ?=(%| -.deps) [%| p.deps]
10922− =/ paths=(unit (list iapi-path-typed))
10923− (api-path-analysis p.parsed marks values.u.prepared molds.u.prepared)
10924− ?~ paths [%| 'API path declaration needs unsupported analysis']
10925− [%& [file src u.prepared externals marks cache.p.deps u.paths]]
10926−::
10927−:: This query classifies a unique path declaration only. Missing evidence
10928−:: or a nonunique name is unknown; it proves nothing about an ask value.
10929−:: Like prepared interfaces, the supplied evidence is a trusted host input.
10930−++ api-path-watchability
10931− |= [evidence=(unit iapi-path-evidence) case-name=term]
10932− ^- ?(%watchable %not-watchable %unknown)
10933− ?~ evidence %unknown
10934− =/ found=(list iapi-path-typed)
10935− (skim paths.u.evidence |=(p=iapi-path-typed =(name.path.p case-name)))
10936− ?. ?=([* ~] found) %unknown
10937− ?~ scry.path.i.found %watchable
10938− %not-watchable
10939−::
10940−:: These are declaration-derived request components, not a callable gate,
10941−:: an ask value, or proof of a value's provenance. Keep the exact trusted
10942−:: source/reader evidence until a later checked interface and lowerer can
10943−:: attach it to a generated request. No argument ordering is claimed here.
10944−+$ iapi-request-parameter [name=term typ=itype at=span]
10945−+$ iapi-request-parts
10946− [evidence=iapi-path-evidence path=iapi-path-typed parameters=(list iapi-request-parameter) reply-sample=itype fold=(unit itype) watchability=?(%watchable %not-watchable)]
10947−++ api-request-parameter-types
10948− |= params=(list iapi-parameter)
10949− ^- (unit (list iapi-request-parameter))
10950− ?~ params `~
10951− =/ aura=@ta aura.i.params
10952− ?. |(?=(?(%u %ud %ux %uv %t %ta %tas %p %da %dr) aura) =('tD' aura)) ~
10953− =/ rest=(unit (list iapi-request-parameter)) $(params t.params)
10954− ?~ rest ~
10955− `[[name.i.params [%atom aura] at.i.params] u.rest]
10956−::
10957−:: A single diff's fold consumes the tagged diff and the previous full value.
10958−:: Multiple-diff unions need a checked union representation and remain open.
10959−++ api-request-fold-type
10960− |= p=iapi-path-typed
10961− ^- (unit (unit itype))
10962− ?~ diffs.p `~
10963− ?^ t.diffs.p ~
10964− =/ d=iapi-mark-type i.diffs.p
10965− =/ literal=lit [%term %tas name.d (crip ['%' (trip name.d)])]
10966− =/ sample=itype [%cell [%cell [%const literal] typ.d] full.p]
10967− ``[%fn sample full.p]
10968−::
10969−++ api-request-parts
10970− |= [evidence=(unit iapi-path-evidence) case-name=term]
10971− ^- (unit iapi-request-parts)
10972− ?~ evidence ~
10973− =/ found=(list iapi-path-typed)
10974− (skim paths.u.evidence |=(p=iapi-path-typed =(name.path.p case-name)))
10975− ?. ?=([* ~] found) ~
10976− =/ p=iapi-path-typed i.found
10977− =/ raw=(unit (list iapi-parameter)) (api-path-parameters segments.path.p ~)
10978− ?~ raw ~
10979− =/ params=(unit (list iapi-request-parameter)) (api-request-parameter-types u.raw)
10980− ?~ params ~
10981− =/ fold=(unit (unit itype)) (api-request-fold-type p)
10982− ?~ fold ~
10983− =/ watch=?(%watchable %not-watchable) ?~(scry.path.p %watchable %not-watchable)
10984− `[u.evidence p u.params full.p u.fold watch]
10985−::
10986−:: Check ordinary API molds and values plus every declared mark type using
10987−:: the same trusted source, prepared prelude and reader inputs as path
10988−:: evidence. Keep elaborations with those inputs for a later interface.
10989−:: This is partial analysis: an unused /- core is not independently checked,
10990−:: definitions needing derived values remain unsupported, and no complete
10991−:: API, request or constructor is exported or given runtime behavior.
10992−+$ iapi-support-evidence
10993− [paths=iapi-path-evidence values=ienv molds=imold-types marks=(list iapi-mark-type) elaborations=(list iwidth-definition)]
10994−++ api-support-analysis-source
10995− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
10996− ^- (each iapi-support-evidence @t)
10997− =/ path-result (api-path-evidence-source file src externals marks modules prepared)
10998− ?: ?=(%| -.path-result) [%| p.path-result]
10999− =/ evidence=iapi-path-evidence p.path-result
11000− =/ parsed (parse file src)
11001− ?: ?=(%| -.parsed) [%| 'API source does not parse']
11002− =/ mod=module p.parsed
11003− =/ ordinary=(list def)
11004− (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11005− =/ prep=iprelude prepared.evidence
11006− ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
11007− =/ vals=(list term) (global-value-names ordinary)
11008− ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11009− =/ declared=(list term) (collect-mark-imports imports.mod)
11010− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
11011− ?~ mark-types [%| 'API declared marks need unsupported inference']
11012− =/ prelude=(unit ifile) `iface.prep
11013− =/ deps=jimports-result
11014− (resolve-jibb-imports imports.mod externals marks modules ~[file] values.prep molds.prep dependencies.evidence prelude)
11015− ?: ?=(%| -.deps) [%| p.deps]
11016− =/ molds=imolds (collect-simple-molds ordinary)
11017− =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
11018− =/ surs=(list term) (collect-sur-imports imports.mod)
11019− =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11020− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11021− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~]
11022− =/ mts=(each imold-types @t) (module-mold-types molds state)
11023− ?: ?=(%| -.mts) [%| p.mts]
11024− =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11025− ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
11026− [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
11027−:: Preserve the same graph context through supporting definitions.
11028−++ api-support-analysis-graph
11029− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11030− ^- (each iapi-support-evidence @t)
11031− =/ path-result (api-path-evidence-graph file src externals marks modules active cache prepared)
11032− ?: ?=(%| -.path-result) [%| p.path-result]
11033− =/ evidence=iapi-path-evidence p.path-result
11034− =/ parsed (parse file src)
11035− ?: ?=(%| -.parsed) [%| 'API source does not parse']
11036− =/ mod=module p.parsed
11037− =/ ordinary=(list def)
11038− (skim defs.mod |=(d=def !&(?=(%mold -.d) |(=(%paths name.d) =(%poke name.d)))))
11039− =/ prep=iprelude prepared.evidence
11040− ?. (module-scope-valid mod(defs ordinary) values.prep molds.prep) [%| 'API ordinary scope needs unsupported inference']
11041− =/ vals=(list term) (global-value-names ordinary)
11042− ?: (lien vals |=(n=term =(n %main))) [%| 'API module kind needs unsupported inference']
11043− =/ declared=(list term) (collect-mark-imports imports.mod)
11044− =/ mark-types=(unit (list iapi-mark-type)) (api-diff-types declared marks declared)
11045− ?~ mark-types [%| 'API declared marks need unsupported inference']
11046− =/ prelude=(unit ifile) `iface.prep
11047− =/ deps=jimports-result
11048− (resolve-jibb-imports imports.mod externals marks modules active values.prep molds.prep dependencies.evidence prelude)
11049− ?: ?=(%| -.deps) [%| p.deps]
11050− =/ molds=imolds (collect-simple-molds ordinary)
11051− =/ globals=(list term) (weld values.prep (weld (import-binding-names imports.mod) vals))
11052− =/ surs=(list term) (collect-sur-imports imports.mod)
11053− =/ reserved=(list term) (weld molds.prep (turn resolved.p.deps |=(j=[face=term interface=ifile] face.j)))
11054− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11055− =/ state=istate [0 ~ ~ ~ molds globals externals surs marks declared resolved.p.deps reserved ~ ~ ~ | file top prelude ~ 256 ~]
11056− =/ mts=(each imold-types @t) (module-mold-types molds state)
11057− ?: ?=(%| -.mts) [%| p.mts]
11058− =/ resolution=iresolved (resolve-groups ordinary molds globals externals surs marks declared resolved.p.deps reserved file prelude)
11059− ?. (module-values-complete ordinary env.resolution) [%| 'API ordinary definitions need unsupported inference']
11060− [%& [evidence env.resolution p.mts u.mark-types artifacts.resolution]]
11061−::
11062−:: Type-analysis artifact for one plain request. The resolver may publish
11063−:: its interface only together with trusted source and reader evidence.
11064−:: No lowering or runtime validator exists.
11065−:: Value watchability remains unproved even for a watchable declaration.
11066−+$ ione-request-interface
11067− [support=iapi-support-evidence parts=iapi-request-parts iface=ifile]
11068−++ request-compatible-ask
11069− |= prelude=iprelude
11070− ^- (unit ischeme)
11071− =/ public=ifile iface.prelude
11072− ?. =(at.public /lib/jibb/prelude/jibb) ~
11073− =/ ask=(unit ischeme) (find-jibb-mold %ask public)
11074− ?~ ask ~
11075− ?. ?=([@ ~] vars.u.ask) ~
11076− ?. ?=(%union -.typ.u.ask) ~
11077− ?. =(origin.typ.u.ask `[/lib/jibb/internal/jibb %ask]) ~
11078− ?. (identity-union-parameters vars.u.ask args.typ.u.ask) ~
11079− =/ m=@ud i.vars.u.ask
11080− ?: (itype-var-is-atom m typ.u.ask) ~
11081− ?. (levy (itype-vars typ.u.ask) |=(n=@ud =(n m))) ~
11082− ?: (itype-has-tag typ.u.ask) ~
11083− =/ private=(list iwidth-dependency)
11084− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11085− ?. ?=([* ~] private) ~
11086− ?~ source.i.private ~
11087− =/ path=(unit ischeme) (find-jibb-mold %path public)
11088− ?~ path ~
11089− ?^ vars.u.path ~
11090− =/ path-type=itype [%collection %list ~[[%atom %ta]]]
11091− ?. =(typ.u.path path-type) ~
11092− =/ unit-template=(unit ischeme) (find-jibb-mold %unit public)
11093− ?~ unit-template ~
11094− ?. (standard-unit-template u.unit-template /lib/jibb/prelude/jibb) ~
11095− =/ state-unit=(unit itype) (template-apply u.unit-template ~[[%noun ~]])
11096− ?~ state-unit ~
11097− =/ path-unit=(unit itype) (template-apply u.unit-template ~[path-type])
11098− ?~ path-unit ~
11099− =/ output=itype [%cell [%face %state [%noun ~]] [%face %message [%var m]]]
11100− =/ agent-input=itype [%cell [%face %mark [%atom %tas]] [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]]
11101− =/ store-input=itype [%cell [%face %state u.state-unit] [%face %fact [%noun ~]]]
11102− =/ pure-case=itype [%cell [%const [%term %tas %pure '%pure']] [%face %value [%var m]]]
11103− =/ agent-case=itype
11104− [%cell [%const [%term %tas %agent '%agent']] [%cell [%face %api [%atom %t]] [%cell [%face %case [%atom %tas]] [%cell [%face %agent [%atom %tas]] [%cell [%face %path path-type] [%cell [%face %scry u.path-unit] [%face %receive [%fn agent-input output]]]]]]]]
11105− =/ store-case=itype
11106− [%cell [%const [%term %tas %store '%store']] [%cell [%face %module [%atom %t]] [%cell [%face %name [%atom %tas]] [%face %receive [%fn store-input output]]]]]
11107− ?. =(cases.typ.u.ask ~[pure-case agent-case store-case]) ~
11108− ask
11109−::
11110−:: The first supported standalone API has exactly one mark import and one
11111−:: plain path declaration, with no other definitions or imports. No partial
11112−:: success is published when source, schema, or a required mold is unknown.
11113−++ one-request-interface-source
11114− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude)]
11115− ^- (each ione-request-interface @t)
11116− =/ out (api-support-analysis-source file src externals marks modules prepared)
11117− ?: ?=(%| -.out) [%| p.out]
11118− =/ support=iapi-support-evidence p.out
11119− =/ ev=iapi-path-evidence paths.support
11120− =/ parsed (parse file src)
11121− ?: ?=(%| -.parsed) [%| 'request source does not parse']
11122− =/ mod=module p.parsed
11123− ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
11124− ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
11125− ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
11126− ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
11127− =/ p=iapi-path-typed i.paths.ev
11128− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11129− ?~ parts [%| 'request components need unsupported inference']
11130− ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
11131− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
11132− ?^ scry.path.p [%| 'request scry needs unsupported inference']
11133− =/ valid-marks=?
11134− ?~ fold.u.parts ?=([* ~] marks.support)
11135− ?=([* [* ~]] marks.support)
11136− ?. valid-marks [%| 'request marks need unsupported inference']
11137− =/ fold-open=?
11138− ?~ fold.u.parts |
11139− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11140− ?: fold-open [%| 'request fold needs unsupported inference']
11141− ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11142− ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11143− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11144− ?~ ask [%| 'request ask needs unsupported inference']
11145− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
11146− ?~ result [%| 'request ask needs unsupported inference']
11147− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11148− =/ sample=itype
11149− ?^ fold.u.parts [%cell callback u.fold.u.parts]
11150− ?~ parameters.u.parts callback
11151− [%cell typ.i.parameters.u.parts callback]
11152− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11153− =/ exports=imold-types
11154− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11155− =/ prelude=iprelude prepared.ev
11156− =/ public=ifile iface.prelude
11157− ?~ source.public [%| 'request prelude source needs unsupported inference']
11158− =/ private=(list iwidth-dependency)
11159− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11160− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11161− ?~ source.i.private [%| 'request internal source needs unsupported inference']
11162− =/ req=irequest-evidence
11163− [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11164− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
11165− [%& [support u.parts interface]]
11166−:: Graph-aware request artifact; resolver use remains type-only.
11167−++ one-request-interface-graph
11168− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11169− ^- (each ione-request-interface @t)
11170− =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
11171− ?: ?=(%| -.out) [%| p.out]
11172− =/ support=iapi-support-evidence p.out
11173− =/ ev=iapi-path-evidence paths.support
11174− =/ parsed (parse file src)
11175− ?: ?=(%| -.parsed) [%| 'request source does not parse']
11176− =/ mod=module p.parsed
11177− ?. ?=(?([[%mark *] ~] [[%mark *] [%mark *] ~]) imports.mod) [%| 'request imports need unsupported inference']
11178− ?. ?=([[%mold *] ~] defs.mod) [%| 'request definitions need unsupported inference']
11179− ?. =(%paths name.i.defs.mod) [%| 'request declaration needs unsupported inference']
11180− ?. ?=([* ~] paths.ev) [%| 'request count needs unsupported inference']
11181− =/ p=iapi-path-typed i.paths.ev
11182− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11183− ?~ parts [%| 'request components need unsupported inference']
11184− ?. ?=(?(~ [* ~]) parameters.u.parts) [%| 'request parameters need unsupported inference']
11185− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) [%| 'request parameter and fold need unsupported inference']
11186− ?^ scry.path.p [%| 'request scry needs unsupported inference']
11187− =/ valid-marks=?
11188− ?~ fold.u.parts ?=([* ~] marks.support)
11189− ?=([* [* ~]] marks.support)
11190− ?. valid-marks [%| 'request marks need unsupported inference']
11191− =/ fold-open=?
11192− ?~ fold.u.parts |
11193− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11194− ?: fold-open [%| 'request fold needs unsupported inference']
11195− ?^ (itype-vars reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11196− ?: (itype-has-tag reply-sample.u.parts) [%| 'request payload needs unsupported inference']
11197− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11198− ?~ ask [%| 'request ask needs unsupported inference']
11199− =/ result=(unit itype) (template-apply u.ask ~[[%var 0]])
11200− ?~ result [%| 'request ask needs unsupported inference']
11201− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11202− =/ sample=itype
11203− ?^ fold.u.parts [%cell callback u.fold.u.parts]
11204− ?~ parameters.u.parts callback
11205− [%cell typ.i.parameters.u.parts callback]
11206− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11207− =/ exports=imold-types
11208− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11209− =/ prelude=iprelude prepared.ev
11210− =/ public=ifile iface.prelude
11211− ?~ source.public [%| 'request prelude source needs unsupported inference']
11212− =/ private=(list iwidth-dependency)
11213− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11214− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11215− ?~ source.i.private [%| 'request internal source needs unsupported inference']
11216− =/ req=irequest-evidence
11217− [file name.path.p p src u.source.public u.source.i.private values.prelude molds.prelude externals marks]
11218− =/ interface=ifile [~[[name.path.p scheme]] exports file ~ ~ ~ `src `[(silt `(list path)`~[file]) ~[req] modules `public values.prelude molds.prelude externals marks]]
11219− [%& [support u.parts interface]]
11220−::
11221−++ api-mark-exports
11222− |= [marks=(list term) all=(list term) externals=imark-externals]
11223− ^- imold-types
11224− ?~ marks ~
11225− =/ t=(unit itype) (find-imported-mark i.marks externals all)
11226− ?~ t $(marks t.marks)
11227− [[i.marks [u.t ~]] $(marks t.marks)]
11228−::
11229−:: Experimental direct poke-only API. Unsupported API declarations fail
11230−:: as a whole; supplied mark reader results retain their existing boundary.
11231−++ api-poke-interface
11232− |= [at=path mod=module mark-externals=imark-externals prelude-values=(list term) prelude-molds=(list term) prelude=(unit ifile)]
11233− ^- (unit ifile)
11234− ?: (lien defs.mod def-has-hole) ~
11235− ?. ?=([%ui %api @ %jibb ~] at) ~
11236− ?^ (duplicate-defs defs.mod) ~
11237− ?~ prelude ~
11238− ?. =(at.u.prelude /lib/jibb/prelude/jibb) ~
11239− =/ poke=(unit ischeme) (find-jibb-mold %poke u.prelude)
11240− ?~ poke ~
11241− ?. ?=(%union -.typ.u.poke) ~
11242− ?^ vars.u.poke ~
11243− =/ compatible=?
11244− %+ lien cases.typ.u.poke
11245− |= c=itype
11246− ?=([%cell [%const [%term %tas %agent *]] [%cell [%face %agent [%atom %tas]] [%cell [%face %mark [%atom %tas]] [%face %payload [%noun ~]]]]] c)
11247− ?. compatible ~
11248− ?. (module-scope-valid mod(defs ~) prelude-values prelude-molds) ~
11249− ?. (levy imports.mod |=(i=import ?=(%mark -.i))) ~
11250− =/ marks=(list term) (collect-mark-imports imports.mod)
11251− ?. ?=([@ ~] marks) ~
11252− =/ ds=(list def) defs.mod
11253− ?. ?=([[%mold *] ~] ds) ~
11254− ?. =(%poke name.i.ds) ~
11255− =/ sh=shape shape.i.ds
11256− ?. ?=([%ref *] sh) ~
11257− ?. ?=([@ ~] names.sh) ~
11258− =/ n=term i.names.sh
11259− ?. (unique-value-name n marks) ~
11260− ?: |((lien prelude-values |=(x=term =(n x))) (lien prelude-molds |=(x=term =(n x)))) ~
11261− =/ mark=(unit itype) (find-imported-mark n mark-externals marks)
11262− ?~ mark ~
11263− =/ sc=ischeme [[%fn u.mark typ.u.poke] ~]
11264− `[~[[n sc]] (api-mark-exports marks marks mark-externals) at ~[[n i.t.t.at n]] ~ ~ ~ ~]
11265−::
11266−:: Source-proven ordinary helpers validate each selected /sur dependency.
11267−:: Unused or less direct cores remain unsupported by this first interface.
11268−++ api-sur-covered
11269− |= [surs=(list term) defs=(list def) externals=iexternals all=(list term)]
11270− ^- ?
11271− ?~ surs &
11272− =/ found=(list def)
11273− %+ skim defs
11274− |= d=def
11275− ?. ?=(%mold -.d) |
11276− ?. ?=(%ref -.shape.d) |
11277− ?. ?=([@ [@ ~]] names.shape.d) |
11278− =(i.t.names.shape.d i.surs)
11279− ?~ found |
11280− =/ selected=def i.found
11281− ?. ?=(%mold -.selected) |
11282− =/ sh=shape shape.selected
11283− ?. ?=(%ref -.sh) |
11284− ?. ?=([@ [@ ~]] names.sh) |
11285− =/ checked=(unit itype) (find-imported-mold i.surs i.names.sh externals all)
11286− ?~ checked |
11287− $(surs t.surs)
11288−::
11289−+$ imulti-request-gates [values=ienv requests=(list irequest-evidence)]
11290−++ api-request-gates
11291− |= [paths=(list iapi-path-typed) ev=iapi-path-evidence ask=ischeme file=path src=@t public=@t internal=@t externals=iexternals marks=imark-externals fuel=@ud]
11292− ^- (unit imulti-request-gates)
11293− ?~ paths `[~ ~]
11294− ?: =(0 fuel) ~
11295− =/ p=iapi-path-typed i.paths
11296− =/ parts=(unit iapi-request-parts) (api-request-parts `ev name.path.p)
11297− ?~ parts ~
11298− ?. ?=(?(~ [* ~]) parameters.u.parts) ~
11299− ?: &(?=(^ fold.u.parts) ?=(^ parameters.u.parts)) ~
11300− ?^ scry.path.p ~
11301− ?^ (itype-vars reply-sample.u.parts) ~
11302− ?: (itype-has-tag reply-sample.u.parts) ~
11303− =/ open-fold=?
11304− ?~ fold.u.parts |
11305− |(?=(^ (itype-vars u.fold.u.parts)) (itype-has-tag u.fold.u.parts))
11306− ?: open-fold ~
11307− =/ result=(unit itype) (template-apply ask ~[[%var 0]])
11308− ?~ result ~
11309− =/ callback=itype [%fn reply-sample.u.parts [%var 0]]
11310− =/ sample=itype
11311− ?^ fold.u.parts [%cell callback u.fold.u.parts]
11312− ?~ parameters.u.parts callback
11313− [%cell typ.i.parameters.u.parts callback]
11314− =/ scheme=ischeme [[%fn sample u.result] ~[0]]
11315− =/ prep=iprelude prepared.ev
11316− =/ req=irequest-evidence
11317− [file name.path.p p src public internal values.prep molds.prep externals marks]
11318− =/ rest=(unit imulti-request-gates)
11319− $(paths t.paths, fuel (dec fuel))
11320− ?~ rest ~
11321− `[[[name.path.p scheme] values.u.rest] [req requests.u.rest]]
11322−::
11323−++ api-poke-from-checked
11324− |= [file=path mod=module marks=imark-externals values=(list term) molds=(list term) prelude=(unit ifile)]
11325− ^- (unit [values=ienv derived=(list iderived)])
11326− =/ pokes=(list def)
11327− (skim defs.mod |=(d=def &(?=(%mold -.d) =(%poke name.d))))
11328− ?~ pokes `[~ ~]
11329− ?. ?=([* ~] pokes) ~
11330− =/ declared=(list term) (collect-mark-imports imports.mod)
11331− =/ ns=(unit (list term)) (api-poke-mark-names pokes declared)
11332− ?~ ns ~
11333− ?. ?=([@ ~] u.ns) ~
11334− =/ matching=(list import)
11335− %+ skim imports.mod
11336− |= i=import
11337− ?. ?=(%mark -.i) |
11338− =(mark.i i.u.ns)
11339− ?. ?=([* ~] matching) ~
11340− =/ checked=(unit ifile)
11341− (api-poke-interface file mod(defs pokes, imports matching) marks values molds prelude)
11342− ?~ checked ~
11343− `[values.u.checked derived.u.checked]
11344−::
11345−:: The partial interface is published atomically: all paths, ordinary
11346−:: source definitions, declared marks and the poke must check. Unselected
11347−:: /sur bindings, runtime validation and value watchability remain unproved.
11348−++ multi-request-interface-graph
11349− |= [file=path src=@t externals=iexternals marks=imark-externals modules=jbundle active=(list path) cache=jcache prepared=(unit iprelude)]
11350− ^- (each [iface=ifile cache=jcache] @t)
11351− =/ out (api-support-analysis-graph file src externals marks modules active cache prepared)
11352− ?: ?=(%| -.out) [%| p.out]
11353− =/ support=iapi-support-evidence p.out
11354− =/ ev=iapi-path-evidence paths.support
11355− =/ parsed (parse file src)
11356− ?: ?=(%| -.parsed) [%| 'request source does not parse']
11357− =/ mod=module p.parsed
11358− ?. (levy imports.mod |=(i=import ?=(?(%mark %sur) -.i)))
11359− [%| 'request imports need unsupported inference']
11360− =/ surs=(list term) (collect-sur-imports imports.mod)
11361− ?. (api-sur-covered surs defs.mod externals surs)
11362− [%| 'API source dependency needs unsupported inference']
11363− ?~ paths.ev [%| 'request count needs unsupported inference']
11364− =/ ask=(unit ischeme) (request-compatible-ask prepared.ev)
11365− ?~ ask [%| 'request ask needs unsupported inference']
11366− =/ prep=iprelude prepared.ev
11367− =/ public=ifile iface.prep
11368− ?~ source.public [%| 'request prelude source needs unsupported inference']
11369− =/ private=(list iwidth-dependency)
11370− (skim dependencies.public |=(d=iwidth-dependency =(at.d /lib/jibb/internal/jibb)))
11371− ?. ?=([* ~] private) [%| 'request internal source needs unsupported inference']
11372− ?~ source.i.private [%| 'request internal source needs unsupported inference']
11373− =/ gates=(unit imulti-request-gates)
11374− (api-request-gates paths.ev ev u.ask file src u.source.public u.source.i.private externals marks 256)
11375− ?~ gates [%| 'request paths need unsupported inference']
11376− =/ poke=(unit [values=ienv derived=(list iderived)])
11377− (api-poke-from-checked file mod marks values.prep molds.prep `public)
11378− ?~ poke [%| 'API poke needs unsupported inference']
11379− =/ mark-molds=imold-types
11380− (turn marks.support |=(m=iapi-mark-type [name.m [typ.m ~]]))
11381− =/ exports=imold-types (weld mark-molds molds.support)
11382− =/ names=(list term) (turn exports |=(m=[name=term template=ischeme] name.m))
11383− ?. (levy names |=(n=term (unique-value-name n names)))
11384− [%| 'API exported molds need unsupported inference']
11385− =/ env=ienv (weld values.u.gates (weld values.u.poke values.support))
11386− =/ graph=irequest-graph
11387− [(silt `(list path)`~[file]) requests.u.gates modules `public values.prep molds.prep externals marks]
11388− =/ iface=ifile
11389− [env exports file derived.u.poke elaborations.support ~ `src `graph]
11390− [%& [iface dependencies.ev]]
11391−::
11392++ infer-jibb-file
6392++ infer-jibb-file
11393− |= [at=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle active=(list path) prelude-values=(list term) prelude-molds=(list term) cache=jcache prelude=(unit ifile)]
6393+ |= [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]
11394 ^- jfile-result
6394 ^- jfile-result
6395+ ?: ?=([%ui %api *] at) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11395 =/ parsed (parse at src)
6396 =/ parsed (parse at src)
11396 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
6397 ?: ?=(%| -.parsed) [%| (crip "module source does not parse: {(spud at)}")]
11397 =/ mod=module p.parsed
6398 =/ mod=module p.parsed
11398− =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11399− ?^ duplicate [%| (show-duplicate-fields at src u.duplicate)]
11400− ?: ?=([%ui %api *] at)
11401− =/ iface=(unit ifile) (api-poke-interface at mod mark-externals prelude-values prelude-molds prelude)
11402− ?^ iface
11403− =/ checked=ifile u.iface(source `src, graph `[(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals])
11404− [%& [checked [[at checked] cache]]]
11405− ?~ prelude [%| (crip "API module needs unsupported inference: {(spud at)}")]
11406− =/ prepared=iprelude [u.prelude prelude-values prelude-molds]
11407− =/ narrow=?
11408− ?. ?=([[%mark *] ~] imports.mod) |
11409− ?. ?=([[%mold *] ~] defs.mod) |
11410− ?. =(%paths name.i.defs.mod) |
11411− !?=(%union -.shape.i.defs.mod)
11412− ?: narrow
11413− =/ request=(each ione-request-interface @t)
11414− (one-request-interface-graph at src externals mark-externals modules active cache `prepared)
11415− ?: ?=(%| -.request) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11416− =/ checked=ifile iface.p.request
11417− [%& [checked [[at checked] dependencies.paths.support.p.request]]]
11418− =/ multi=(each [iface=ifile cache=jcache] @t)
11419− (multi-request-interface-graph at src externals mark-externals modules active cache `prepared)
11420− ?: ?=(%| -.multi) [%| (crip "API module needs unsupported inference: {(spud at)}")]
11421− [%& [iface.p.multi [[at iface.p.multi] cache.p.multi]]]
11422− ?. (module-scope-valid mod prelude-values prelude-molds)
6399+ ?. (module-scope-valid mod prelude-values prelude-molds) [%| (crip "module has conflicting names: {(spud at)}")]
11423− ?: (pending-declared-poke at mod prelude-values prelude-molds)
11424− [%| (crip "module kind or scope needs unsupported inference: {(spud at)}")]
11425− [%| (crip "module has conflicting names: {(spud at)}")]
11426 =/ vals=(list term) (global-value-names defs.mod)
6400 =/ vals=(list term) (global-value-names defs.mod)
11427 ?: (lien vals |=(n=term =(n %main)))
6401 ?: (lien vals |=(n=term =(n %main)))
11428 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
6402 [%| (crip "module kind needs unsupported inference: {(spud at)}")]
11429− =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache prelude)
6403+ =/ js=jimports-result (resolve-jibb-imports imports.mod externals mark-externals modules active prelude-values prelude-molds cache)
11430 ?: ?=(%| -.js) [%| p.js]
6404 ?: ?=(%| -.js) [%| p.js]
11431 =/ molds=imolds (collect-simple-molds defs.mod)
6405 =/ molds=imolds (collect-simple-molds defs.mod)
11432 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
6406 =/ globals=(list term) (weld prelude-values (weld (import-binding-names imports.mod) vals))
11433 =/ surs=(list term) (collect-sur-imports imports.mod)
6407 =/ surs=(list term) (collect-sur-imports imports.mod)
11434 =/ marks=(list term) (collect-mark-imports imports.mod)
6408 =/ marks=(list term) (collect-mark-imports imports.mod)
11435 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
6409 =/ reserved=(list term) (weld prelude-molds (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11436− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11437− =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ | at top prelude ~ 256 ~]
6410+ =/ state=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks resolved.p.js reserved ~ ~ ~ |]
11438 =/ mts=(each imold-types @t) (module-mold-types molds state)
6411 =/ mts=(each imold-types @t) (module-mold-types molds state)
11439 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
6412 ?: ?=(%| -.mts) [%| (crip "{(trip p.mts)}: {(spud at)}")]
11440− =/ resolution=iresolved (resolve-groups defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved at prelude)
6413+ =/ env=ienv (resolve-supported-defs defs.mod molds globals externals surs mark-externals marks resolved.p.js reserved)
11441− =/ env=ienv env.resolution
11442 ?. (module-values-complete defs.mod env)
6414 ?. (module-values-complete defs.mod env)
11443 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
6415 [%| (crip "module definitions need unsupported inference: {(spud at)}")]
11444− =/ initial=irequest-graph [(silt `(list path)`~[at]) ~ modules prelude prelude-values prelude-molds externals mark-externals]
6416+ [%& [[env p.mts] [[at [env p.mts]] cache.p.js]]]
11445− =/ graph=(unit irequest-graph) (request-graph-merge resolved.p.js initial (add 1 (lent resolved.p.js)))
11446− ?~ graph [%| 'module request evidence needs unsupported inference']
11447− =/ iface=ifile [env p.mts at ~ artifacts.resolution ~ `src graph]
11448− [%& [iface [[at iface] cache.p.js]]]
11449−::
11450−:: A source-bound analysis of one named mold, not a module, island,
11451−:: request, watchability or runtime check. The host owns the trusted
11452−:: prepared prelude, canonical paths and reader/source version identities.
11453−:: The 256-node cap covers only classification, not source/graph work.
11454−+$ igate-free-mold
11455− [at=path source=@t name=term prepared=iprelude externals=iexternals marks=imark-externals modules=jbundle dependencies=jcache mold=ischeme requested=@ud budget=@ud result=igate-free]
11456−++ gate-free-mold-source
11457− |= [file=path src=@t name=term externals=iexternals marks=imark-externals modules=jbundle prepared=(unit iprelude) fuel=@ud]
11458− ^- (each igate-free-mold @t)
11459− ?~ file [%| 'mold analysis needs a path ending in jibb']
11460− ?. =(%jibb (rear file)) [%| 'mold analysis needs a path ending in jibb']
11461− ?: |(=(file /lib/jibb/internal/jibb) =(file /lib/jibb/primitives/jibb))
11462− [%| 'the prelude internal modules are private']
11463− ?: ?=([%ui %api *] file) [%| 'API declarations need unsupported mold analysis']
11464− ?: ?=([%ui %stores *] file) [%| 'store declarations need unsupported mold analysis']
11465− =/ entries=jbundle (skim modules |=(m=jsource =(file at.m)))
11466− ?: (gth (lent entries) 1) [%| 'duplicate root module sources']
11467− =/ wrong-root=? ?~(entries | !=(source.i.entries src))
11468− ?: wrong-root [%| 'root module source does not match bundle']
11469− =/ parsed (parse file src)
11470− ?: ?=(%| -.parsed) [%| 'mold source does not parse']
11471− =/ mod=module p.parsed
11472− =/ duplicate=(unit idiag) (duplicate-defs defs.mod)
11473− ?^ duplicate [%| (show-duplicate-fields file src u.duplicate)]
11474− ?~ prepared [%| 'mold analysis needs the prepared prelude']
11475− ?. (module-scope-valid mod values.u.prepared molds.u.prepared)
11476− [%| 'mold source has conflicting or unsupported scope']
11477− =/ selected=(list def)
11478− (skim defs.mod |=(d=def &(?=(%mold -.d) =(name.d name))))
11479− ?~ selected [%| 'selected mold is not declared']
11480− ?^ t.selected [%| 'selected mold is not unique']
11481− ?> ?=(%mold -.i.selected)
11482− =/ public=ifile iface.u.prepared
11483− =/ js=jimports-result
11484− (resolve-jibb-imports imports.mod externals marks modules ~[file] values.u.prepared molds.u.prepared ~ `public)
11485− ?: ?=(%| -.js) [%| p.js]
11486− =/ ms=imolds (collect-simple-molds defs.mod)
11487− =/ vals=(list term) (global-value-names defs.mod)
11488− =/ globals=(list term) (weld values.u.prepared (weld (import-binding-names imports.mod) vals))
11489− =/ surs=(list term) (collect-sur-imports imports.mod)
11490− =/ declared=(list term) (collect-mark-imports imports.mod)
11491− =/ reserved=(list term) (weld molds.u.prepared (turn resolved.p.js |=(j=[face=term interface=ifile] face.j)))
11492− =/ top=(list term) (turn ms |=(m=[name=term body=shape] name.m))
11493− =/ state=istate [0 ~ ~ ~ ms globals externals surs marks declared resolved.p.js reserved ~ ~ ~ | file top `public ~ 256 ~]
11494− =/ inferred=(unit [template=ischeme state=istate])
11495− (infer-mold-template shape.i.selected state(active ~[name], in-mold &))
11496− ?~ inferred [%| 'selected mold needs unsupported inference']
11497− =/ template=ischeme template.u.inferred
11498− =. typ.template (label-direct-union typ.template shape.i.selected name state)
11499− =. typ.template (itype-normalize typ.template sub.state.u.inferred)
11500− =/ cap=@ud (min fuel 256)
11501− =/ analysis=igate-free (gate-free-type typ.template cap ~)
11502− [%& [file src name u.prepared externals marks modules cache.p.js template fuel cap analysis]]
11503::
6417::
11504:: +golden-types-with-modules fails closed for imports without prelude
6418:: +golden-types-with-modules fails closed for imports without prelude
11505:: scope. +golden-types-with-prelude resolves supported library graphs;
6419:: scope. +golden-types-with-prelude resolves supported library graphs;
@@ -11510,103 +6424,54 @@
11510 ^- @t
6424 ^- @t
11511 =/ parsed (parse file src)
6425 =/ parsed (parse file src)
11512 ?: ?=(%| -.parsed) (show-error src p.parsed)
6426 ?: ?=(%| -.parsed) (show-error src p.parsed)
11513− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11514− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11515 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
6427 ?: (lien imports.p.parsed |=(i=import ?=(%jibb -.i)))
11516 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
6428 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
11517 (golden-types-with-marks file src externals mark-externals)
6429 (golden-types-with-marks file src externals mark-externals)
11518::
6430::
11519−:: The caller supplies the actual prelude source. Its declared names are
6431+:: The caller supplies the actual prelude source. Its current names are
11520−:: reserved, and supported inferred types are made available. The inventory
6432+:: reserved, but its incomplete inventory and types are not checked here.
11521−:: and the checker are incomplete, so this never claims a checked module.
11522−:: Hosts may prepare the same trusted source once and reuse its interface.
11523::
6433::
11524++ golden-types-with-prelude
6434++ golden-types-with-prelude
11525 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t]
6435 |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t]
11526 ^- @t
6436 ^- @t
11527 =/ parsed (parse file src)
6437 =/ parsed (parse file src)
11528 ?: ?=(%| -.parsed) (show-error src p.parsed)
6438 ?: ?=(%| -.parsed) (show-error src p.parsed)
11529− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11530− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11531 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
6439 ?: =(0 prelude-source) 'partial inference; module not checked\0aprelude source missing; module import inference unsupported'
11532 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
6440 =/ prelude (parse /lib/jibb/prelude/jibb prelude-source)
11533 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
6441 ?: ?=(%| -.prelude) 'partial inference; module not checked\0aprelude source does not parse; module import inference unsupported'
11534− =/ prepared=(unit iprelude) (prepare-prelude prelude-source)
6442+ =/ prelude-values=(list term) (global-value-names defs.p.prelude)
11535− ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
6443+ =/ prelude-molds=(list term)
11536− (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
6444+ (turn (collect-simple-molds defs.p.prelude) |=(m=[name=term body=shape] name.m))
11537−::
11538−++ golden-types-with-prelude-and-internal
11539− |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prelude-source=@t internal-source=@t]
11540− ^- @t
11541− =/ prepared=(unit iprelude) (prepare-prelude-with-internal prelude-source internal-source)
11542− (golden-types-with-prepared-prelude file src externals mark-externals modules prepared)
11543−::
11544−++ golden-types-with-prepared-prelude
11545− |= [file=path src=@t externals=iexternals mark-externals=imark-externals modules=jbundle prepared=(unit iprelude)]
11546− ^- @t
11547− =/ parsed (parse file src)
11548− ?: ?=(%| -.parsed) (show-error src p.parsed)
11549− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11550− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11551− ?~ prepared 'partial inference; module not checked\0aprelude interface is not supported'
11552− =/ prelude-values=(list term) values.u.prepared
11553− =/ prelude-molds=(list term) molds.u.prepared
11554− =/ iface=(unit ifile) `iface.u.prepared
11555 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
6445 ?. (module-scope-valid p.parsed prelude-values prelude-molds)
11556− ?: (pending-declared-poke file p.parsed prelude-values prelude-molds)
11557− 'partial inference; module not checked\0amodule kind or scope needs unsupported inference'
11558 'partial inference; module not checked\0amodule has conflicting names'
6446 'partial inference; module not checked\0amodule has conflicting names'
11559 =/ js=jimports-result
6447 =/ js=jimports-result
11560− (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~ iface)
6448+ (resolve-jibb-imports imports.p.parsed externals mark-externals modules ~[file] prelude-values prelude-molds ~)
11561 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
6449 ?: ?=(%| -.js) (of-wain:format ~['partial inference; module not checked' p.js])
11562 =/ scope-values=(list term)
6450 =/ scope-values=(list term)
11563 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
6451 (weld prelude-values (weld (collect-sur-imports imports.p.parsed) (collect-mark-imports imports.p.parsed)))
11564− (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds iface)
6452+ (golden-types-in-context file src externals mark-externals resolved.p.js scope-values prelude-molds)
11565::
6453::
11566:: +golden-types-with-marks: supply declared mark types separately from /sur
6454:: +golden-types-with-marks: supply declared mark types separately from /sur
11567:: entries, as [mark result] with the result from +read-mark:jibb-import.
6455:: entries, as [mark result] with the result from +read-mark:jibb-import.
11568:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
6456:: Unknown, duplicated, failed and undeclared entries never resolve a mold.
11569::
6457::
11570−:: Callers pass unchanged structured reader results; graph validation
11571−:: remains in the existing bridge, and failures stay available lazily.
11572−++ reader-result-for-checker
11573− |= result=*
11574− ^- *
11575− ?: ?=([%ok *] result) [%& +.result]
11576− result
11577−::
11578−++ golden-types-with-reader-diagnostics
11579− |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
11580− ^- @t
11581− =/ ex=iexternals
11582− (turn externals |=(e=[module=term name=term result=*] [module.e name.e (reader-result-for-checker result.e)]))
11583− =/ mx=imark-externals
11584− (turn mark-externals |=(e=[mark=term result=*] [mark.e (reader-result-for-checker result.e)]))
11585− (golden-types-with-marks file src ex mx)
11586−::
11587++ golden-types-with-marks
6458++ golden-types-with-marks
11588 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
6459 |= [file=path src=@t externals=iexternals mark-externals=imark-externals]
11589 ^- @t
6460 ^- @t
11590− (golden-types-in-context file src externals mark-externals ~ ~ ~ ~)
6461+ (golden-types-in-context file src externals mark-externals ~ ~ ~)
11591::
6462::
11592++ golden-types-in-context
6463++ golden-types-in-context
11593− |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term) prelude=(unit ifile)]
6464+ |= [file=path src=@t externals=iexternals mark-externals=imark-externals jimports=ijimports prelude-values=(list term) reserved-molds=(list term)]
11594 ^- @t
6465 ^- @t
11595 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
6466 =. reserved-molds (weld reserved-molds (turn jimports |=(j=[face=term interface=ifile] face.j)))
11596 =/ parsed (parse file src)
6467 =/ parsed (parse file src)
11597 ?: ?=(%| -.parsed) (show-error src p.parsed)
6468 ?: ?=(%| -.parsed) (show-error src p.parsed)
11598− =/ duplicate=(unit idiag) (duplicate-defs defs.p.parsed)
11599− ?^ duplicate (duplicate-fields-report file src u.duplicate)
11600− ?: (module-has-reserved-proj p.parsed)
11601− 'module has reserved proj name'
11602 =/ ds=(list def) defs.p.parsed
6469 =/ ds=(list def) defs.p.parsed
11603 =/ molds=imolds (collect-simple-molds ds)
6470 =/ molds=imolds (collect-simple-molds ds)
11604 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
6471 =/ globals=(list term) (weld prelude-values (weld (turn jimports |=(j=[face=term interface=ifile] face.j)) (global-value-names ds)))
11605 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
6472 =/ surs=(list term) (collect-sur-imports imports.p.parsed)
11606 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
6473 =/ marks=(list term) (collect-mark-imports imports.p.parsed)
11607− =/ resolution=iresolved (resolve-groups ds molds globals externals surs mark-externals marks jimports reserved-molds file prelude)
6474+ =/ env=ienv (resolve-supported-defs ds molds globals externals surs mark-externals marks jimports reserved-molds)
11608− =/ cycles=(list icycle) (definite-value-cycles ds globals)
11609− =/ env=ienv env.resolution
11610 =/ lines=(list @t) ~
6475 =/ lines=(list @t) ~
11611 |-
6476 |-
11612 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
6477 ?~ ds (of-wain:format ['partial inference; module not checked' (flop lines)])
@@ -11615,54 +6480,21 @@
11615 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
6480 $(ds t.ds, lines [(show-partial-mold file src d molds) lines])
11616 ?. (unique-value-name name.d globals)
6481 ?. (unique-value-name name.d globals)
11617 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
6482 $(ds t.ds, lines [(crip "++ {(trip name.d)}: name already in scope") lines])
11618− =/ cycle=(list icycle) (skim cycles |=(c=icycle =(name.c name.d)))
11619− ?^ cycle
11620− =/ diag=idiag ["non-gate value depends on itself through a cycle" ~[[first.i.cycle "value in cycle"] [next.i.cycle "dependency in cycle"]]]
11621− $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
11622− ?: (lien grouped.resolution |=(n=term =(n name.d)))
11623− =/ found=(unit ischeme) (ienv-lookup name.d env)
11624− ?~ found $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive group unavailable") lines])
11625− =/ typ=itype (canonical-itype typ.u.found vars.u.found)
11626− =/ line=@t (crip "++ {(trip name.d)}: {(show-itype typ ~)}{(show-atom-constraint typ)}")
11627− $(ds t.ds, lines [line lines])
11628− =/ top=(list term) (turn molds |=(m=[name=term body=shape] name.m))
11629− =/ initial=istate [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ | file top prelude ~ 256 ~]
6483+ =/ result=iresult (infer-fragment val.d env [0 ~ ~ ~ molds globals externals surs mark-externals marks jimports reserved-molds ~ ~ ~ |])
11630− =. initial (reserve-def-caps val.d initial)
11631− =/ result=iresult
11632− ?: |(?=(%gate -.val.d) ?=(%gate-wide -.val.d))
11633− (infer-recursive-gate d env initial)
11634− (infer-fragment val.d env initial)
11635 ?: ?=(%| -.result)
6484 ?: ?=(%| -.result)
11636 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
6485 $(ds t.ds, lines [(show-inference-diagnostic file src name.d p.result) lines])
11637− =. state.p.result (promote-restricted-numbers state.p.result env)
11638− =. state.p.result (default-hole-numbers holes.state.p.result holes.initial state.p.result env !(itype-has-gate (itype-normalize typ.p.result sub.state.p.result)))
11639− =/ hole=(unit idiag) (unresolved-hole holes.state.p.result holes.initial state.p.result)
11640− ?^ hole
11641− $(ds t.ds, lines [(show-inference-diagnostic file src name.d u.hole) lines])
11642− =/ merged=(unit [first=icap second=icap])
11643− (merged-capitals caps.state.p.result sub.state.p.result)
11644− ?^ merged
11645− =/ diag=idiag
11646− ["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"]]]
11647− $(ds t.ds, lines [(show-inference-diagnostic file src name.d diag) lines])
11648 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
6486 ?: (constrained-capitals caps.state.p.result sub.state.p.result)
11649 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
6487 $(ds t.ds, lines [(crip "++ {(trip name.d)}: explicit capital constraints are not supported by partial inference") lines])
11650 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
6488 =/ typ=itype (default-decimals (itype-normalize typ.p.result sub.state.p.result))
11651− ?: (pending-null tags.state.p.result sub.state.p.result)
11652− $(ds t.ds, lines [(crip "++ {(trip name.d)}: `~` needs context in partial inference") lines])
11653 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ))
6489 ?: |((pending-tags tags.state.p.result sub.state.p.result) (itype-has-tag typ))
11654 $(ds t.ds, lines [(crip "++ {(trip name.d)}: tag needs context in partial inference") lines])
6490 $(ds t.ds, lines [(crip "++ {(trip name.d)}: tag needs context in partial inference") lines])
11655− ?: (itype-has-hidden-recursive typ)
6491+ ?: (itype-has-union typ)
11656− $(ds t.ds, lines [(crip "++ {(trip name.d)}: recursive mold name is not available in this scope") lines])
11657− ?: (itype-has-hidden-generic typ)
11658− $(ds t.ds, lines [(crip "++ {(trip name.d)}: generic union name is not available in this scope") lines])
6492+ $(ds t.ds, lines [(crip "++ {(trip name.d)}: union type printing is not supported by partial inference") lines])
11659 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
6493 ?: (unsupported-atom-vars typ caps.state.p.result binders.state.p.result sub.state.p.result)
11660 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
6494 $(ds t.ds, lines [(crip "++ {(trip name.d)}: unresolved aura-variable inference") lines])
11661 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
6495 =/ vars=(list @ud) (unique-type-vars (itype-vars typ))
11662 ?: (gth (lent vars) 26)
6496 ?: (gth (lent vars) 26)
11663 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
6497 $(ds t.ds, lines [(crip "++ {(trip name.d)}: too many variables for partial printer") lines])
11664− ?~ (width-finalize projections.state.p.result sub.state.p.result vars)
11665− $(ds t.ds, lines [(crip "++ {(trip name.d)}: record projection elaboration needs unsupported inference") lines])
11666 =/ printable=itype (canonical-itype typ vars)
6498 =/ printable=itype (canonical-itype typ vars)
11667 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
6499 =/ line=@t (crip "++ {(trip name.d)}: {(show-itype printable ~)}{(show-atom-constraint printable)}")
11668 $(ds t.ds, lines [line lines])
6500 $(ds t.ds, lines [line lines])
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+43−157
@@ -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
@@ -263,83 +229,3 @@
263 ?- xs
229 ?- xs
264 ~ start
230 ~ start
265 [item rest] (combine item (reel rest start combine))
231 [item rest] (combine item (reel rest start combine))
266−
267−++ flit |= predicate=$-(A ?)
268− |= value=A
269− ^- (unit A)
270− ?- (predicate value)
271− %.y `value
272− %.n ~
273−
274−++ murn |= args=[(list A) $-(A (unit B))]
275− ?- args
276− [xs f] ^- (list B)
277− ?- xs
278− ~ ~
279− [item rest]
280− ?- (f item)
281− ~ (murn rest f)
282− [~ value] [value (murn rest f)]
283−
284−++ join |= args=[A (list A)]
285− ?- args
286− [separator xs] ^- (list A)
287− ?- xs
288− ~ ~
289− [item rest]
290− ?- rest
291− ~ [item ~]
292− [next more] [item [separator (join separator rest)]]
293−
294−++ snip |= xs=(list A)
295− ^- (list A)
296− ?- xs
297− ~ ~
298− [item rest]
299− ?- rest
300− ~ ~
301− [next more] [item (snip rest)]
302−
303−++ rear |= xs=(list A)
304− ?- xs
305− ~ !!
306− [item rest]
307− ?- rest
308− ~ item
309− [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)]
tests/clay-fixtures/ford-nested-union-bridge-expected.txtdeleted−1
@@ -1 +0,0 @@
1−'partial inference; module not checked\0a++ value: $-([id=@ud value=([a=@ud b=@t] @ud)] ([a=@ud b=@t] @ud))\0a++ values: $-([title=@t values=(list @ud)] (list @ud))\0a++ chain: $-(chain.blog chain.blog)'
tests/clay-fixtures/ford-nested-union-bridge.txtdeleted−14
@@ -1,14 +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/import-fixture/hoon)
5−=/ blog=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/sur/blog/hoon)
6−=/ reader=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb-import/hoon)
7−=/ jibb=vase .^(vase %ca /[(scot %p our.bowl)]/my-app/[(scot %da now)]/lib/jibb/hoon)
8−=/ read-gate=vase (slap reader (ream 'read-named'))
9−=/ result=vase (slym read-gate [%import-fixture %nested -.src])
10−=/ sample-result=vase (slym read-gate [%import-fixture %sample -.src])
11−=/ chain-result=vase (slym read-gate [%blog %chain -.blog])
12−=/ check-gate=vase (slap jibb (ream 'golden-types-imports'))
13−=/ text=@t '/- import-fixture\0a/- blog\0a++ value |= x=nested.import-fixture value.x\0a++ values |= x=sample.import-fixture values.x\0a++ chain |= x=chain.blog x\0a'
14−(pure:m (slym check-gate [/ui/test/jibb text ~[[%import-fixture %nested +.result] [%import-fixture %sample +.sample-result] [%blog %chain +.chain-result]]]))
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/module-cache-incomplete/about.txt+1−1
@@ -1,4 +1,4 @@
1source: Grammar, Modules: "Everything is exported and read through the import's face"; Imports: "Import cycles are errors".
1source: Grammar, Modules: "Everything is exported and read through the import's face"; Imports: "Import cycles are errors".
2−tests: A shared library with a recursive mold, which partial inference does not yet support, yields no interface even though one value could be inferred.
2+tests: A shared library with a generic union mold, which partial inference does not yet support, yields no interface even though one value could be inferred.
3expect: parses
3expect: parses
4expect-types: a partial inference report
4expect-types: a partial inference report
tests/golden/module-cache-incomplete/module-trees.txt+9−6
@@ -1,8 +1,11 @@
1/ui/bad.jibb
1/ui/bad.jibb
2(module
2(module
3− (mold 1:1 recursive
3+ (mold 1:1 choice
4+ (generic 1:11 A
5+ (union 2:3
4− (cell 1:14
6+ (cell 2:3
5− (face 1:15 next (ref 1:20 recursive))
7+ (const 2:4 %some)
6− (face 1:30 value (aura 1:36 @t))))
8+ (face 2:10 value (tvar 2:16 A)))
9+ (const 3:3 %none))))
7− (value 2:1 id
10+ (value 4:1 id
8− (gate-wide 2:7 (bind 2:10 x) (wing 2:12 x))))
11+ (gate-wide 4:7 (bind 4:10 x) (wing 4:12 x))))
tests/golden/module-cache-incomplete/modules/ui/bad.jibb+3−1
@@ -1,2 +1,4 @@
1−+$ recursive [next=recursive value=@t]
1++$ choice |$ [A]
2+ [%some value=A]
3+ %none
2++ id |=(x x)
4++ id |=(x x)
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+2−3
@@ -5,8 +5,8 @@ partial inference; module not checked
5++ not: $-(? ?)
5++ not: $-(? ?)
6+$ list: cases proven disjoint; mold not checked
6+$ list: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
8−++ fall: $-([(unit A) A] A)
8+++ fall: sample mold is not supported by partial inference
9−++ need: $-((unit A) A)
9+++ need: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
12+$ dime: not checked
12+$ dime: not checked
@@ -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-basic/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
5++ not: $-(? ?)
5++ not: $-(? ?)
6+$ list: cases proven disjoint; mold not checked
6+$ list: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
8−++ fall: $-([(unit A) A] A)
8+++ fall: sample mold is not supported by partial inference
9−++ need: $-((unit A) A)
9+++ need: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
12+$ dime: not checked
12+$ dime: not checked
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+2−3
@@ -5,8 +5,8 @@ partial inference; module not checked
5++ not: $-(? ?)
5++ not: $-(? ?)
6+$ list: cases proven disjoint; mold not checked
6+$ list: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
8−++ fall: $-([(unit A) A] A)
8+++ fall: sample mold is not supported by partial inference
9−++ need: $-((unit A) A)
9+++ need: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
12+$ dime: not checked
12+$ dime: not checked
@@ -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-3g-structural/types.txt+2−2
@@ -5,8 +5,8 @@ partial inference; module not checked
5++ not: $-(? ?)
5++ not: $-(? ?)
6+$ list: cases proven disjoint; mold not checked
6+$ list: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
8−++ fall: $-([(unit A) A] A)
8+++ fall: sample mold is not supported by partial inference
9−++ need: $-((unit A) A)
9+++ need: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
12+$ dime: not checked
12+$ dime: not checked
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 |$
578+97:9 glyph |=
568−97:12 glyph [
579+97:12 name veq
569−97:13 tight tvar A
580+97:15 tight glyph =
570−97:14 tight glyph ]
581+97:16 tight glyph (
571−97:16 glyph [
582+97:17 tight name like
572−97:17 tight name p
583+97:22 tvar A
573−97:18 tight glyph =
584+97:23 tight glyph )
574−97:19 tight name hair
585+98:3 INDENT
575−97:24 name q
586+98:3 glyph ?-
576−97:25 tight glyph =
587+98:6 wing q.veq
577−97:26 tight glyph (
588+99:5 INDENT
578−97:27 tight name unit
589+99:5 lit ~
579−97:32 glyph [
590+99:7 glyph !!
580−97:33 tight name p
591+100:5 NEWLINE
581−97:34 tight glyph =
592+100:5 glyph [
582−97:35 tight tvar A
593+100:6 tight lit ~
583−97:37 name q
594+100:8 name product
584−97:38 tight glyph =
595+100:15 tight glyph ]
585−97:39 tight name nail
596+100:17 wing p.product
586−97:43 tight glyph ]
597+102:1 DEDENT
587−97:44 tight glyph )
598+102:1 DEDENT
588−97:45 tight glyph ]
599+102:1 NEWLINE
589−99:1 NEWLINE
600+102:1 glyph +$
590−99:1 glyph ++
601+102:4 name lone
591−99:4 name like
602+102:9 glyph |$
592−99:9 glyph |=
603+102:12 glyph [
593−99:12 glyph [
604+102:13 tight tvar A
594−99:13 tight name f
605+102:14 tight glyph ]
595−99:14 tight glyph =
606+102:16 glyph [
596−99:15 tight glyph $-(
607+102:17 tight name p
597−99:18 tight tvar A
608+102:18 tight glyph =
598−99:20 tvar B
609+102:19 tight tvar A
599−99:21 tight glyph )
610+102:20 tight glyph ]
600−99:23 name result
611+104:1 NEWLINE
601−99:29 tight glyph =
612+104:1 glyph +$
602−99:30 tight glyph (
613+104:4 name lest
603−99:31 tight name like
614+104:9 glyph |$
604−99:36 tvar A
615+104:12 glyph [
605−99:37 tight glyph )
616+104:13 tight tvar A
606−99:38 tight glyph ]
617+104:14 tight glyph ]
607−100:3 INDENT
618+104:16 glyph [
608−100:3 glyph ++
619+104:17 tight name i
609−100:6 name mapped
620+104:18 tight glyph =
610−101:5 INDENT
621+104:19 tight tvar A
611−101:5 glyph ^-
622+104:21 name t
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
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 ]
643−104:36 tight glyph =
629+106:1 NEWLINE
644−104:37 tight wing q.value
630+106:1 glyph +$
645−104:44 tight glyph ]
631+106:4 name pole
646−105:3 DEDENT
632+106:9 glyph |$
647−105:3 DEDENT
633+106:12 glyph [
648−105:3 DEDENT
634+106:13 tight tvar A
649−105:3 NEWLINE
635+106:14 tight glyph ]
650−105:3 glyph ^-
636+107:3 INDENT
651−105:6 glyph (
637+107:3 lit ~
652−105:7 tight name like
638+108:3 NEWLINE
653−105:12 tvar B
639+108:3 glyph [
654−105:13 tight glyph )
640+108:4 tight tvar A
655−105:15 glyph [
641+108:6 glyph (
656−105:16 tight name p
642+108:7 tight name pole
657−105:17 tight glyph =
643+108:12 tvar A
658−105:18 tight wing p.result
644+108:13 tight glyph )
659−105:27 name q
645+108:14 tight glyph ]
660−105:28 tight glyph =
646+110:1 DEDENT
661−105:29 tight name mapped
647+110:1 NEWLINE
662−105:35 tight glyph ]
648+110:1 glyph +$
663−107:1 DEDENT
649+110:4 name quip
664−107:1 NEWLINE
650+110:9 glyph |$
665−107:1 glyph ++
651+110:12 glyph [
666−107:4 name wonk
652+110:13 tight tvar A
667−107:9 glyph |=
653+110:15 tvar B
668−107:12 name veq
654+110:16 tight glyph ]
669−107:15 tight glyph =
655+110:18 glyph [
670−107:16 tight glyph (
656+110:19 tight glyph (
671−107:17 tight name like
657+110:20 tight name list
672−107:22 tvar A
658+110:25 tvar A
673−107:23 tight glyph )
659+110:26 tight glyph )
674−108:3 INDENT
660+110:28 tvar B
675−108:3 glyph ?-
661+110:29 tight 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 ]
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+3−4
@@ -5,8 +5,8 @@ partial inference; module not checked
5++ not: $-(? ?)
5++ not: $-(? ?)
6+$ list: cases proven disjoint; mold not checked
6+$ list: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
8−++ fall: $-([(unit A) A] A)
8+++ fall: sample mold is not supported by partial inference
9−++ need: $-((unit A) A)
9+++ need: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
12+$ dime: not checked
12+$ dime: not checked
@@ -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-list-unit/types.txt+2−2
@@ -5,7 +5,7 @@ partial inference; module not checked
5++ not: $-(? ?)
5++ not: $-(? ?)
6+$ list: cases proven disjoint; mold not checked
6+$ list: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
7+$ unit: cases proven disjoint; mold not checked
8−++ fall: $-([(unit A) A] A)
8+++ fall: sample mold is not supported by partial inference
9−++ need: $-((unit A) A)
9+++ need: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
10++ weld: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
11++ turn: sample mold is not supported by partial inference
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`, `both` and `clef`, and 2b includes `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, two ways to combine units, complementary list filters, 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+43−151
@@ -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
@@ -263,77 +229,3 @@
263 ?- xs
229 ?- xs
264 ~ start
230 ~ start
265 [item rest] (combine item (reel rest start combine))
231 [item rest] (combine item (reel rest start combine))
266−
267−++ flit |= predicate=$-(A ?)
268− |= value=A
269− ^- (unit A)
270− ?- (predicate value)
271− %.y `value
272− %.n ~
273−
274−++ murn |= args=[(list A) $-(A (unit B))]
275− ?- args
276− [xs f] ^- (list B)
277− ?- xs
278− ~ ~
279− [item rest]
280− ?- (f item)
281− ~ (murn rest f)
282− [~ value] [value (murn rest f)]
283−
284−++ join |= args=[A (list A)]
285− ?- args
286− [separator xs] ^- (list A)
287− ?- xs
288− ~ ~
289− [item rest]
290− ?- rest
291− ~ [item ~]
292− [next more] [item [separator (join separator rest)]]
293−
294−++ snip |= xs=(list A)
295− ^- (list A)
296− ?- xs
297− ~ ~
298− [item rest]
299− ?- rest
300− ~ ~
301− [next more] [item (snip rest)]
302−
303−++ rear |= xs=(list A)
304− ?- xs
305− ~ !!
306− [item rest]
307− ?- rest
308− ~ item
309− [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+1382−2185
@@ -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,826 @@
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+231:61 DEDENT
1473−231:27 glyph $-(
1428+231:61 DEDENT
1474−231:30 tight tvar A
1429+231:61 DEDENT
1475−231:32 glyph ?
1430+231:61 DEDENT
1476−231:33 tight glyph )
1431+231:61 NEWLINE
1477−231:34 tight glyph ]
1478−232:3 INDENT
1479−232:3 glyph ^-
1480−232:6 glyph ?
1481−233:5 INDENT
1482−233:5 glyph ?-
1483−233:8 name args
1484−234:7 INDENT
1485−234:7 glyph [
1486−234:8 tight name xs
1487−234:11 name predicate
1488−234:20 tight glyph ]
1489−235:9 INDENT
1490−235:9 glyph ?-
1491−235:12 name xs
1492−236:11 INDENT
1493−236:11 lit ~
1494−236:13 lit %.y
1495−237:11 NEWLINE
1496−237:11 glyph [
1497−237:12 tight name item
1498−237:17 name rest
1499−237:21 tight glyph ]
1500−238:13 INDENT
1501−238:13 glyph ?-
1502−238:16 glyph (
1503−238:17 tight name predicate
1504−238:27 name item
1505−238:31 tight glyph )
1506−239:15 INDENT
1507−239:15 lit %.y
1508−239:19 glyph (
1509−239:20 tight name levy
1510−239:25 name rest
1511−239:30 name predicate
1512−239:39 tight glyph )
1513−240:15 NEWLINE
1514−240:15 lit %.n
1515−240:19 lit %.n
1516−242:1 DEDENT
1517−242:1 DEDENT
1518−242:1 DEDENT
1519−242:1 DEDENT
1520−242:1 DEDENT
1521−242:1 DEDENT
1522−242:1 DEDENT
1523−242:1 NEWLINE
1524−242:1 glyph ++
1525−242:4 name lien
1526−242:9 glyph |=
1527−242:12 name args
1528−242:16 tight glyph =
1529−242:17 tight glyph [
1530−242:18 tight glyph (
1531−242:19 tight name list
1532−242:24 tvar A
1533−242:25 tight glyph )
1534−242:27 glyph $-(
1535−242:30 tight tvar A
1536−242:32 glyph ?
1537−242:33 tight glyph )
1538−242:34 tight glyph ]
1539−243:3 INDENT
1540−243:3 glyph ^-
1541−243:6 glyph ?
1542−244:5 INDENT
1543−244:5 glyph ?-
1544−244:8 name args
1545−245:7 INDENT
1546−245:7 glyph [
1547−245:8 tight name xs
1548−245:11 name predicate
1549−245:20 tight glyph ]
1550−246:9 INDENT
1551−246:9 glyph ?-
1552−246:12 name xs
1553−247:11 INDENT
1554−247:11 lit ~
1555−247:13 lit %.n
1556−248:11 NEWLINE
1557−248:11 glyph [
1558−248:12 tight name item
1559−248:17 name rest
1560−248:21 tight glyph ]
1561−249:13 INDENT
1562−249:13 glyph ?-
1563−249:16 glyph (
1564−249:17 tight name predicate
1565−249:27 name item
1566−249:31 tight glyph )
1567−250:15 INDENT
1568−250:15 lit %.y
1569−250:19 lit %.y
1570−251:15 NEWLINE
1571−251:15 lit %.n
1572−251:19 glyph (
1573−251:20 tight name lien
1574−251:25 name rest
1575−251:30 name predicate
1576−251:39 tight glyph )
1577−253:1 DEDENT
1578−253:1 DEDENT
1579−253:1 DEDENT
1580−253:1 DEDENT
1581−253:1 DEDENT
1582−253:1 DEDENT
1583−253:1 DEDENT
1584−253:1 NEWLINE
1585−253:1 glyph ++
1586−253:4 name roll
1587−253:9 glyph |=
1588−253:12 name args
1589−253:16 tight glyph =
1590−253:17 tight glyph [
1591−253:18 tight glyph (
1592−253:19 tight name list
1593−253:24 tvar A
1594−253:25 tight glyph )
1595−253:27 tvar B
1596−253:29 glyph $-(
1597−253:32 tight glyph [
1598−253:33 tight tvar A
1599−253:35 tvar B
1600−253:36 tight glyph ]
1601−253:38 tvar B
1602−253:39 tight glyph )
1603−253:40 tight glyph ]
1604−254:3 INDENT
1605−254:3 glyph ?-
1606−254:6 name args
1607−255:5 INDENT
1608−255:5 glyph [
1609−255:6 tight name xs
1610−255:9 name start
1611−255:15 name combine
1612−255:22 tight glyph ]
1613−256:7 INDENT
1614−256:7 glyph ?-
1615−256:10 name xs
1616−257:9 INDENT
1617−257:9 lit ~
1618−257:11 name start
1619−258:9 NEWLINE
1620−258:9 glyph [
1621−258:10 tight name item
1622−258:15 name rest
1623−258:19 tight glyph ]
1624−258:21 glyph (
1625−258:22 tight name roll
1626−258:27 name rest
1627−258:32 glyph (
1628−258:33 tight name combine
1629−258:41 name item
1630−258:46 name start
1631−258:51 tight glyph )
1632−258:53 name combine
1633−258:60 tight glyph )
1634−260:1 DEDENT
1635−260:1 DEDENT
1636−260:1 DEDENT
1637−260:1 DEDENT
1638−260:1 NEWLINE
1639−260:1 glyph ++
1640−260:4 name reel
1641−260:9 glyph |=
1642−260:12 name args
1643−260:16 tight glyph =
1644−260:17 tight glyph [
1645−260:18 tight glyph (
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
1662−262:5 glyph [
1663−262:6 tight name xs
1664−262:9 name start
1665−262:15 name combine
1666−262:22 tight glyph ]
1667−263:7 INDENT
1668−263:7 glyph ?-
1669−263:10 name xs
1670−264:9 INDENT
1671−264:9 lit ~
1672−264:11 name start
1673−265:9 NEWLINE
1674−265:9 glyph [
1675−265:10 tight name item
1676−265:15 name rest
1677−265:19 tight glyph ]
1678−265:21 glyph (
1679−265:22 tight name combine
1680−265:30 name item
1681−265:35 glyph (
1682−265:36 tight name reel
1683−265:41 name rest
1684−265:46 name start
1685−265:52 name combine
1686−265:59 tight glyph )
1687−265:60 tight glyph )
1688−267:1 DEDENT
1689−267:1 DEDENT
1690−267:1 DEDENT
1691−267:1 DEDENT
1692−267:1 NEWLINE
1693−267:1 glyph ++
1694−267:4 name flit
1695−267:9 glyph |=
1696−267:12 name predicate
1697−267:21 tight glyph =
1698−267:22 tight glyph $-(
1699−267:25 tight tvar A
1700−267:27 glyph ?
1701−267:28 tight glyph )
1702−268:3 INDENT
1703−268:3 glyph |=
1704−268:6 name value
1705−268:11 tight glyph =
1706−268:12 tight tvar A
1707−269:5 INDENT
1708−269:5 glyph ^-
1709−269:8 glyph (
1710−269:9 tight name unit
1711−269:14 tvar A
1712−269:15 tight glyph )
1713−270:7 INDENT
1714−270:7 glyph ?-
1715−270:10 glyph (
1716−270:11 tight name predicate
1717−270:21 name value
1718−270:26 tight glyph )
1719−271:9 INDENT
1720−271:9 lit %.y
1721−271:13 glyph `
1722−271:14 tight name value
1723−272:9 NEWLINE
1724−272:9 lit %.n
1725−272:13 lit ~
1726−274:1 DEDENT
1727−274:1 DEDENT
1728−274:1 DEDENT
1729−274:1 DEDENT
1730−274:1 NEWLINE
1731−274:1 glyph ++
1732−274:4 name murn
1733−274:9 glyph |=
1734−274:12 name args
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+606−966

This diff is too big to show here.

tests/golden/prelude-unit-list-transforms/types.txt+8−28

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

This diff is too big to show here.

tests/golden/types-generic-face-inference/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-generic-face-inference/tokens.txtdeleted−134

This diff is too big to show here.

tests/golden/types-generic-face-inference/tree.txtdeleted−56

This diff is too big to show here.

tests/golden/types-generic-face-inference/types.txtdeleted−13

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

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/module-trees.txtdeleted−11

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/modules/ui/base.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/tokens.txtdeleted−75

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/tree.txtdeleted−24

This diff is too big to show here.

tests/golden/types-generic-union-alias-face/types.txtdeleted−12

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-generic-union-alias/source.jibbdeleted−23

This diff is too big to show here.

tests/golden/types-generic-union-alias/tokens.txtdeleted−248

This diff is too big to show here.

tests/golden/types-generic-union-alias/tree.txtdeleted−86

This diff is too big to show here.

tests/golden/types-generic-union-alias/types.txtdeleted−22

This diff is too big to show here.

tests/golden/types-generic-union-capitals/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-capitals/source.jibbdeleted−17

This diff is too big to show here.

tests/golden/types-generic-union-capitals/tokens.txtdeleted−162

This diff is too big to show here.

tests/golden/types-generic-union-capitals/tree.txtdeleted−68

This diff is too big to show here.

tests/golden/types-generic-union-capitals/types.txtdeleted−34

This diff is too big to show here.

tests/golden/types-generic-union-errors/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-errors/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/types-generic-union-errors/tokens.txtdeleted−93

This diff is too big to show here.

tests/golden/types-generic-union-errors/tree.txtdeleted−36

This diff is too big to show here.

tests/golden/types-generic-union-errors/types.txtdeleted−26

This diff is too big to show here.

tests/golden/types-generic-union-escaping/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-escaping/module-trees.txtdeleted−16

This diff is too big to show here.

tests/golden/types-generic-union-escaping/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-generic-union-escaping/modules/ui/base.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-generic-union-escaping/modules/ui/mid.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-generic-union-escaping/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-generic-union-escaping/tokens.txtdeleted−15

This diff is too big to show here.

tests/golden/types-generic-union-escaping/tree.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-escaping/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-generic-union-import/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-import/module-trees.txtdeleted−32

This diff is too big to show here.

tests/golden/types-generic-union-import/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-generic-union-import/modules/ui/shared.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-import/modules/ui/twin.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-import/source.jibbdeleted−9

This diff is too big to show here.

tests/golden/types-generic-union-import/tokens.txtdeleted−79

This diff is too big to show here.

tests/golden/types-generic-union-import/tree.txtdeleted−27

This diff is too big to show here.

tests/golden/types-generic-union-import/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-generic-union-local/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-local/source.jibbdeleted−34

This diff is too big to show here.

tests/golden/types-generic-union-local/tokens.txtdeleted−297

This diff is too big to show here.

tests/golden/types-generic-union-local/tree.txtdeleted−120

This diff is too big to show here.

tests/golden/types-generic-union-local/types.txtdeleted−22

This diff is too big to show here.

tests/golden/types-generic-union-transitive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-transitive/module-trees.txtdeleted−27

This diff is too big to show here.

tests/golden/types-generic-union-transitive/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-generic-union-transitive/modules/ui/base.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-generic-union-transitive/modules/ui/mid.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-generic-union-transitive/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-generic-union-transitive/tokens.txtdeleted−43

This diff is too big to show here.

tests/golden/types-generic-union-transitive/tree.txtdeleted−15

This diff is too big to show here.

tests/golden/types-generic-union-transitive/types.txtdeleted−5

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-mark-record/about.txt+2−2

This diff is too big to show here.

tests/golden/types-import-mark-record/source.jibb+1−1

This diff is too big to show here.

tests/golden/types-import-mark-record/tokens.txt+1−1

This diff is too big to show here.

tests/golden/types-import-mark-record/tree.txt+1−1

This diff is too big to show here.

tests/golden/types-import-mark-record/types.txt+1−1

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-list-context/source.jibbdeleted−17

This diff is too big to show here.

tests/golden/types-list-context/tokens.txtdeleted−143

This diff is too big to show here.

tests/golden/types-list-context/tree.txtdeleted−59

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-list-imported/imports.txtdeleted−2

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-list-imported/source.jibbdeleted−14

This diff is too big to show here.

tests/golden/types-list-imported/sur/fixture.txtdeleted−4

This diff is too big to show here.

tests/golden/types-list-imported/tokens.txtdeleted−109

This diff is too big to show here.

tests/golden/types-list-imported/tree.txtdeleted−52

This diff is too big to show here.

tests/golden/types-list-imported/types.txtdeleted−22

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

This diff is too big to show here.

tests/golden/types-list-pattern-imported/imports.txtdeleted−2

This diff is too big to show here.

tests/golden/types-list-pattern-imported/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-list-pattern-imported/source.jibbdeleted−13

This diff is too big to show here.

tests/golden/types-list-pattern-imported/sur/fixture.txtdeleted−5

This diff is too big to show here.

tests/golden/types-list-pattern-imported/tokens.txtdeleted−66

This diff is too big to show here.

tests/golden/types-list-pattern-imported/tree.txtdeleted−32

This diff is too big to show here.

tests/golden/types-list-pattern-imported/types.txtdeleted−4

This diff is too big to show here.

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-list-patterns/source.jibbdeleted−64

This diff is too big to show here.

tests/golden/types-list-patterns/tokens.txtdeleted−359

This diff is too big to show here.

tests/golden/types-list-patterns/tree.txtdeleted−168

This diff is too big to show here.

tests/golden/types-list-patterns/types.txtdeleted−17

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

This diff is too big to show here.

tests/golden/types-null-context/source.jibbdeleted−8

This diff is too big to show here.

tests/golden/types-null-context/tokens.txtdeleted−57

This diff is too big to show here.

tests/golden/types-null-context/tree.txtdeleted−25

This diff is too big to show here.

tests/golden/types-null-context/types.txtdeleted−7

This diff is too big to show here.

tests/golden/types-null-overlap/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-null-overlap/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-null-overlap/tokens.txtdeleted−8

This diff is too big to show here.

tests/golden/types-null-overlap/tree.txtdeleted−3

This diff is too big to show here.

tests/golden/types-null-overlap/types.txtdeleted−8

This diff is too big to show here.

tests/golden/types-null-unresolved/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-null-unresolved/source.jibbdeleted−18

This diff is too big to show here.

tests/golden/types-null-unresolved/tokens.txtdeleted−79

This diff is too big to show here.

tests/golden/types-null-unresolved/tree.txtdeleted−34

This diff is too big to show here.

tests/golden/types-null-unresolved/types.txtdeleted−9

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

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-prelude-direct/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-prelude-direct/tokens.txtdeleted−53

This diff is too big to show here.

tests/golden/types-prelude-direct/tree.txtdeleted−25

This diff is too big to show here.

tests/golden/types-prelude-direct/types.txtdeleted−6

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

This diff is too big to show here.

tests/golden/types-prelude-interface/module-trees.txtdeleted−13

This diff is too big to show here.

tests/golden/types-prelude-interface/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-prelude-interface/modules/ui/left.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-interface/modules/ui/right.jibbdeleted−1

This diff is too big to show here.

tests/golden/types-prelude-interface/source.jibbdeleted−10

This diff is too big to show here.

tests/golden/types-prelude-interface/tokens.txtdeleted−81

This diff is too big to show here.

tests/golden/types-prelude-interface/tree.txtdeleted−33

This diff is too big to show here.

tests/golden/types-prelude-interface/types.txtdeleted−9

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-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-alias/types.txt+1−1

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-branch-context/source.jibbdeleted−54

This diff is too big to show here.

tests/golden/types-union-branch-context/tokens.txtdeleted−237

This diff is too big to show here.

tests/golden/types-union-branch-context/tree.txtdeleted−120

This diff is too big to show here.

tests/golden/types-union-branch-context/types.txtdeleted−24

This diff is too big to show here.

tests/golden/types-union-branch-pending/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-branch-pending/source.jibbdeleted−24

This diff is too big to show here.

tests/golden/types-union-branch-pending/tokens.txtdeleted−102

This diff is too big to show here.

tests/golden/types-union-branch-pending/tree.txtdeleted−48

This diff is too big to show here.

tests/golden/types-union-branch-pending/types.txtdeleted−6

This diff is too big to show here.

tests/golden/types-union-constructor-shape/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-constructor-shape/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-union-constructor-shape/tokens.txtdeleted−58

This diff is too big to show here.

tests/golden/types-union-constructor-shape/tree.txtdeleted−24

This diff is too big to show here.

tests/golden/types-union-constructor-shape/types.txtdeleted−12

This diff is too big to show here.

tests/golden/types-union-context-flow/types.txt+2−2

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-import/types.txt+1−1

This diff is too big to show here.

tests/golden/types-union-local-pending/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-local-pending/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-local-pending/tokens.txtdeleted−10

This diff is too big to show here.

tests/golden/types-union-local-pending/tree.txtdeleted−5

This diff is too big to show here.

tests/golden/types-union-local-pending/types.txtdeleted−2

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

This diff is too big to show here.

tests/golden/types-union-overlap-nested/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-union-overlap-nested/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/types-union-overlap-nested/tree.txtdeleted−7

This diff is too big to show here.

tests/golden/types-union-overlap-nested/types.txtdeleted−9

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

This diff is too big to show here.

tests/golden/types-union-phantom-generic/source.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-union-phantom-generic/tokens.txtdeleted−21

This diff is too big to show here.

tests/golden/types-union-phantom-generic/tree.txtdeleted−8

This diff is too big to show here.

tests/golden/types-union-phantom-generic/types.txtdeleted−3

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-print-cross-namespace/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/module-trees.txtdeleted−6

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/modules/ui/lib.jibbdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/source.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/tokens.txtdeleted−22

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/tree.txtdeleted−9

This diff is too big to show here.

tests/golden/types-union-print-cross-namespace/types.txtdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-distinct/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-distinct/module-trees.txtdeleted−12

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules.txtdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules/ui/left.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules/ui/right.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-distinct/modules/ui/twin.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-distinct/source.jibbdeleted−11

This diff is too big to show here.

tests/golden/types-union-print-distinct/tokens.txtdeleted−87

This diff is too big to show here.

tests/golden/types-union-print-distinct/tree.txtdeleted−34

This diff is too big to show here.

tests/golden/types-union-print-distinct/types.txtdeleted−9

This diff is too big to show here.

tests/golden/types-union-print-escape/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-escape/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-union-print-escape/tokens.txtdeleted−20

This diff is too big to show here.

tests/golden/types-union-print-escape/tree.txtdeleted−8

This diff is too big to show here.

tests/golden/types-union-print-escape/types.txtdeleted−2

This diff is too big to show here.

tests/golden/types-union-print-local/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-local/source.jibbdeleted−6

This diff is too big to show here.

tests/golden/types-union-print-local/tokens.txtdeleted−28

This diff is too big to show here.

tests/golden/types-union-print-local/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-union-print-local/types.txtdeleted−5

This diff is too big to show here.

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

This diff is too big to show here.

tests/golden/types-union-print-nested/source.jibbdeleted−7

This diff is too big to show here.

tests/golden/types-union-print-nested/tokens.txtdeleted−42

This diff is too big to show here.

tests/golden/types-union-print-nested/tree.txtdeleted−17

This diff is too big to show here.

tests/golden/types-union-print-nested/types.txtdeleted−6

This diff is too big to show here.

tests/golden/types-union-print-same-origin/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-same-origin/module-trees.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-same-origin/modules.txtdeleted−1

This diff is too big to show here.

tests/golden/types-union-print-same-origin/modules/ui/shared.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-same-origin/source.jibbdeleted−5

This diff is too big to show here.

tests/golden/types-union-print-same-origin/tokens.txtdeleted−35

This diff is too big to show here.

tests/golden/types-union-print-same-origin/tree.txtdeleted−12

This diff is too big to show here.

tests/golden/types-union-print-same-origin/types.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-transitive/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-union-print-transitive/module-trees.txtdeleted−8

This diff is too big to show here.

tests/golden/types-union-print-transitive/modules.txtdeleted−2

This diff is too big to show here.

tests/golden/types-union-print-transitive/modules/ui/base.jibbdeleted−3

This diff is too big to show here.

tests/golden/types-union-print-transitive/modules/ui/mid.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-union-print-transitive/source.jibbdeleted−2

This diff is too big to show here.

tests/golden/types-union-print-transitive/tokens.txtdeleted−15

This diff is too big to show here.

tests/golden/types-union-print-transitive/tree.txtdeleted−6

This diff is too big to show here.

tests/golden/types-union-print-transitive/types.txtdeleted−2

This diff is too big to show here.

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

This diff is too big to show here.

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

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

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.jibbdeleted−46

This diff is too big to show here.

tests/golden/types-unit-context/tokens.txtdeleted−489

This diff is too big to show here.

tests/golden/types-unit-context/tree.txtdeleted−220

This diff is too big to show here.

tests/golden/types-unit-context/types.txtdeleted−95

This diff is too big to show here.

tests/golden/types-unit-patterns/about.txtdeleted−4

This diff is too big to show here.

tests/golden/types-unit-patterns/source.jibbdeleted−36

This diff is too big to show here.

tests/golden/types-unit-patterns/tokens.txtdeleted−180

This diff is too big to show here.

tests/golden/types-unit-patterns/tree.txtdeleted−88

This diff is too big to show here.

tests/golden/types-unit-patterns/types.txtdeleted−13

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

This diff is too big to show here.

tests/importer/shadow-static.txt−7

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−91

This diff is too big to show here.

tests/importer/tree.txt+18−109

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−127

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-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-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-list-alias-guards.hoondeleted−27

This diff is too big to show here.

tests/lib/jibb-module-scope.hoon+1−100

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.hoon+393−1572

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-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-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/about.txt+7−29

This diff is too big to show here.

tests/type-import/expected.txt+2−130

This diff is too big to show here.

tests/type-import/source.txt−67

This diff is too big to show here.

tests/type-import/sur.txt−16

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−9

This diff is too big to show here.

tests/type-module-scope/expected.txt−54

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.

tools/clay-fixtures−69

This diff is too big to show here.

tools/golden+2−18

This diff is too big to show here.

tools/importer-test+1−1

This diff is too big to show here.

tools/ship+7−49

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+3−35

This diff is too big to show here.

tools/testdata/ship-selftest+2−89

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-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-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-list-alias-testdeleted−33

This diff is too big to show here.

tools/type-module-scope-test+1−10

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.