Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
26d8f71
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
c957308
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
31d99c5
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
fda3314
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
9a1e150
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
f37fd78
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
f0df912
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
1b35825
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
246ec08
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
69cf0aa
Merge remote-tracking branch 'origin/main' into session/silent-lynx-2…
Jul 13, 2026
f681dd3
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
cb6e07d
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
ef830a1
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
dda5068
Remove non-fold-residue debug scaffolding from int-literal PR.
Jul 13, 2026
3dece8b
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
d060c82
Revert "WIP: Wave 1 criterion 1 — general body producer PR-A→E (resum…
Jul 13, 2026
d733148
Provision node in emit-host TS smokes when runner lacks it.
Jul 13, 2026
8a843b9
Fix emit-host node bootstrap string for dag resolve.
Jul 13, 2026
6e874d4
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
e6b2d66
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
74edbed
Fix Slice C de-cement completion and CI resolve failures on #6532.
Jul 13, 2026
6af863d
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
6a3681b
Fix CI NFR roster and integer i32 decode diagnostic locus.
Jul 13, 2026
6628b0f
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
ea31def
Remove stray audit tool outputs from repo root.
Jul 13, 2026
a928803
Merge remote-tracking branch 'origin/main' into session/silent-lynx-2…
Jul 13, 2026
e5d251a
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
f30c705
Fix CI NFR roster after main merge and tidy resolve_atom indent.
Jul 13, 2026
11fce93
Remove stray .tmp_cmd_output.txt from repo root.
Jul 13, 2026
45af8cc
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
9bf844d
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
ae0b25a
Add dissolve-on receipt for v2 eval bool runtime predicates; preserve…
Jul 13, 2026
7772f1b
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
ef399c6
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
7ba9a89
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
f5b06e9
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
c35f972
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
00f5755
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
1a00cab
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
6a15d87
Merge remote-tracking branch 'origin/main' into session/silent-lynx-2…
Jul 13, 2026
12bc08a
WIP: Wave 1 criterion 1 — general body producer PR-A→E (resume; zesty…
Jul 13, 2026
80e99aa
general body producer: ingested if-body fn_decl -> Arrow, green by ex…
Jul 14, 2026
0b0ea0f
address §5 review: body_lower_try_if_from_node returns honest Absent,…
Jul 14, 2026
42fa164
Merge remote-tracking branch 'origin/main' into consolidate/int-liter…
Jul 14, 2026
5f9b320
fix inherited doc-graph orphan: wire shell-to-dag census doc into its…
Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions dag/tools/emit_host_transport.dag
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ import tools.host_prelude { toolchain_provision_shell_exec }

data fixture_cargo_toml: String = "[package]\nname = \"emit_host_fixture\"\nversion = \"0.0.0\"\nedition = \"2021\"\n\n[[bin]]\nname = \"fixture\"\npath = \"src/main.rs\""

data typed_smoke_doc: String = "run_rust_smoke and run_python_smoke are runtime-present sites: gunbc invokes each step, so per the shell-emission-model rule they are typed service operations (shell.Mktemp/Mkdir/Remove, Filesystem.Write for the heredoc bodies, cargo.Build.BuildManifest, python.Interpreter.RunFile, gunbc.WitnessBin.Run), never serialized bash. The former wc -c byte-count check strengthened to CONTENT equality: the fixtures emit NUL bytes precisely because printable output could pass a count check with wrong content; the expected string is built in-substrate from the same stdout_byte_count authority (repeat_string of from_code_point(0)), and NULs survive the transport's trailing-whitespace trim. Cleanup runs unconditionally (the old set -e script leaked the tempdir on mid-script failure)."
data typed_smoke_doc: String = "run_rust_smoke and run_python_smoke are runtime-present sites: gunbc invokes each step, so per the shell-emission-model rule they are typed service operations (shell.Mktemp/Mkdir/Remove, Filesystem.Write for the heredoc bodies, cargo.Build.BuildManifest, python.Interpreter.RunFile, gunbc.WitnessBin.Run), never serialized bash. The former wc -c byte-count check strengthened to CONTENT equality: the fixtures emit NUL bytes precisely because printable output could pass a count check with wrong content; the expected string is built in-substrate from the same stdout_byte_count authority (repeat_string of from_code_point(0)), and NULs survive the transport's trailing-whitespace trim. Cleanup runs unconditionally (the old set -e script leaked the tempdir on mid-script failure). run_go_smoke, run_ts_smoke, and run_node_http_serve_smoke provision missing toolchains under WORKDIR before the smoke body (go.dev tarball; nodejs.org official linux tarball — npx ships in the same bin/) so self-hosted runners without a fleet-wide node install still pass emit_host_gate_passes."

data emit_host_node_bootstrap_shell_dissolution_trigger: String = "🟡 dissolve-on: emit_host_node_bootstrap_script — concat-interpolated bash fragment (curl/tar nodejs.org linux tarball into WORKDIR/nodeboot) spliced into run_ts_smoke and run_node_http_serve_smoke via toolchain_provision_shell_exec; transport scaffold parallel to run_go_smoke's inline go.dev tarball provision (module already on medium_structure_exception_roster). DISSOLVES WHEN emit_host TS/node smokes route through typed extdeps ops like run_rust_smoke/run_python_smoke (shell.Mktemp/Mkdir, modeled curl/tar or node runtime provision row) — retire this string carrier and shrink the exception roster entry for dag/tools/emit_host_transport.dag."

data emit_host_node_bootstrap_script: String = "if ! command -v node >/dev/null 2>&1; then\n NODEBOOT=\"$WORKDIR/nodeboot\"\n mkdir -p \"$NODEBOOT\"\n ARCH=$(uname -m)\n case \"$ARCH\" in aarch64|arm64) NODEARCH=arm64 ;; x86_64|amd64) NODEARCH=x64 ;; *) exit 1 ;; esac\n curl -fsSL \"https://nodejs.org/dist/v22.22.3/node-v22.22.3-linux-$NODEARCH.tar.xz\" | tar -xJ -C \"$NODEBOOT\" --strip-components=1\n PATH=\"$NODEBOOT/bin:$PATH\"\n export PATH\nfi\n"

fn expected_stdout_nul_run() -> String {
repeat_string(s: from_code_point(0), n: byte_size_count(stdout_byte_count))
Expand Down Expand Up @@ -61,12 +65,12 @@ fn run_go_smoke() -> Bool {

fn run_ts_smoke() -> Bool {
let expected = byte_size_count(ts_signed_i32_le_byte_count)
let script = "set -e\ncommand -v node >/dev/null 2>&1\ncommand -v npx >/dev/null 2>&1\nWORKDIR=$(mktemp -d)\ncat > \"$WORKDIR/fixture.ts\" <<'EOF'\n{ts_host_fixture_source}\nEOF\ncd \"$WORKDIR\" && npx -y -p typescript@5.9.2 tsc --target ES2022 --module commonjs --outDir . fixture.ts\nBYTES=$(node \"$WORKDIR/fixture.js\" | wc -c | tr -d ' ')\nrm -rf \"$WORKDIR\"\ntest \"$BYTES\" -eq {expected}"
let script = "set -e\nWORKDIR=$(mktemp -d)\n{emit_host_node_bootstrap_script}command -v node >/dev/null 2>&1\ncommand -v npx >/dev/null 2>&1\ncat > \"$WORKDIR/fixture.ts\" <<'EOF'\n{ts_host_fixture_source}\nEOF\ncd \"$WORKDIR\" && npx -y -p typescript@5.9.2 tsc --target ES2022 --module commonjs --outDir . fixture.ts\nBYTES=$(node \"$WORKDIR/fixture.js\" | wc -c | tr -d ' ')\nrm -rf \"$WORKDIR\"\ntest \"$BYTES\" -eq {expected}"
toolchain_provision_shell_exec(script: script)
}

fn run_node_http_serve_smoke() -> Bool {
let server_source = gunbhub_node_http_server_source()
let script = "set -e\ncommand -v node >/dev/null 2>&1\ncommand -v curl >/dev/null 2>&1\nWORKDIR=$(mktemp -d)\ncat > \"$WORKDIR/server.js\" <<'GUNBC_EOF'\n{server_source}\nGUNBC_EOF\nPORT=18471\nHOST=127.0.0.1 PORT=$PORT node \"$WORKDIR/server.js\" &\nSERVER_PID=$!\ntrap 'kill $SERVER_PID 2>/dev/null; rm -rf \"$WORKDIR\"' EXIT\nfor i in 1 2 3 4 5; do\n sleep 0.3\n if curl -sf http://127.0.0.1:$PORT/ >/dev/null 2>&1; then break; fi\ndone\nSTATUS=$(curl -s -o /dev/null -w '%\{http_code\}' http://127.0.0.1:$PORT/)\ntest \"$STATUS\" -eq 200"
let script = "set -e\nWORKDIR=$(mktemp -d)\n{emit_host_node_bootstrap_script}command -v node >/dev/null 2>&1\ncommand -v curl >/dev/null 2>&1\ncat > \"$WORKDIR/server.js\" <<'GUNBC_EOF'\n{server_source}\nGUNBC_EOF\nPORT=18471\nHOST=127.0.0.1 PORT=$PORT node \"$WORKDIR/server.js\" &\nSERVER_PID=$!\ntrap 'kill $SERVER_PID 2>/dev/null; rm -rf \"$WORKDIR\"' EXIT\nfor i in 1 2 3 4 5; do\n sleep 0.3\n if curl -sf http://127.0.0.1:$PORT/ >/dev/null 2>&1; then break; fi\ndone\nSTATUS=$(curl -s -o /dev/null -w '%\{http_code\}' http://127.0.0.1:$PORT/)\ntest \"$STATUS\" -eq 200"
toolchain_provision_shell_exec(script: script)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Provisioning window / executor-capability model — design for sign-off

> **Status: DESIGN-ONLY, sign-ready draft.** No implementation. Parent arc: **ShellProgram → DAG de-fork** (witty-ibex-317). Formalizes the operator-signed **bash-minimization rule** ([shell-emission-model.md](shell-emission-model.md)) into typed authorities that gate when shell/bash emission is legitimate vs when typed argv / typed transport / typed plan interpretation is required. Complements [orchestration-as-intent-design.md](orchestration-as-intent-design.md) (gap B — *what* to emit) and [host-effect-orchestration.md](host-effect-orchestration.md) (Phase D `EmitArtifactThenThinRun`). DESIGN refs: §2 (decompose, don't re-coin), §3 (intent / transport / policy are three facts; dispatch is realization), §5 (fail-closed; construction over validation), §6 (scaffold with named dissolution trigger).
> **Status: DESIGN-ONLY, sign-ready draft.** No implementation. Parent arc: **ShellProgram → DAG de-fork** (witty-ibex-317). Formalizes the operator-signed **bash-minimization rule** ([shell-emission-model.md](shell-emission-model.md)) into typed authorities that gate when shell/bash emission is legitimate vs when typed argv / typed transport / typed plan interpretation is required. Complements [orchestration-as-intent-design.md](orchestration-as-intent-design.md) (gap B — *what* to emit) and [host-effect-orchestration.md](host-effect-orchestration.md) (Phase D `EmitArtifactThenThinRun`); the residual census and arc-completion scoping that builds on this authority is tracked in [shell-to-dag-residual-census-and-arc-completion.md](shell-to-dag-residual-census-and-arc-completion.md). DESIGN refs: §2 (decompose, don't re-coin), §3 (intent / transport / policy are three facts; dispatch is realization), §5 (fail-closed; construction over validation), §6 (scaffold with named dissolution trigger).
>
> Every place I am unsure is tagged **⚠ FLAG**. This lane records direction for operator + parent sign-off; no load-bearing `.dag` edit until signed.

Expand Down
6 changes: 6 additions & 0 deletions src/v1/stage0/src/cli_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12125,14 +12125,20 @@ const NON_FOLD_RESIDUE_ROSTER: &[&str] = &[
"src/v2/compiler/05_eval.dag::run_test_claim_runtime_assert",
"src/v2/compiler/06_translate.dag::translate_algebra_finalize",
"src/v2/compiler/emit_host.dag::run_test_claim_emit_vs_eval_verdict",
"src/v2/compiler/emit_host.dag::runtime_value_signed_i32_le_as_int",
"src/v2/compiler/self_host/frontier_probe_types.dag::frontier_blocker_class_matches",
"src/v2/test/claim/manual/eval_runtime.dag::eval_arg_is_two_literal",
"src/v2/extdeps/formats/spice_passive_projection.dag::passive_spec_from_component",
"src/v2/extdeps/formats/spice_passive_projection.dag::passive_topology_from_component",
"src/v2/extdeps/runtimes/v2_evaluator.dag::v2_eval_runtime_bool_is_false",
"src/v2/extdeps/runtimes/v2_evaluator.dag::v2_eval_runtime_bool_is_true",
"src/v2/extdeps/runtimes/v2_evaluator.dag::v2_eval_runtime_value_as_int",
"src/v2/extdeps/runtimes/v2_effect_io_pure.dag::effect_io_pure_backends_match",
"src/v2/lens/testgen.dag::algebra_law_subject_for_manual_anchor",
"src/v2/lens/testgen.dag::nat_manual_anchor_key_eq",
"src/v2/lens/testgen.dag::testgen_emit_language_behavior_equivalence_claim",
"src/v2/lens/testgen.dag::testgen_emit_refinement_preservation_claim",
"src/v2/std/node.dag::connective_edge_discipline_for_children",
"src/v2/test/claim/generated/coproduct_exhaustiveness.dag::anchor_is",
"src/v2/test/claim/generated/cross_representation_equality.dag::anchor_is_straddle",
"src/v2/lens/complexity.dag::complexity_bound_dominates",
Expand Down
53 changes: 39 additions & 14 deletions src/v2/compiler/02_parse.dag
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import v2.std.provenance {
}
import v2.std.collection { Absent, List, Map, Optional, Present, Set, empty_map, list_at_optional, map_get, map_insert }
import std.algebra { Cons, Empty }
import v2.std.algebra { HeadAbsent, HeadFound, TailAbsent, TailFound, any, contains, filter, fold_list, fold_list_right, is_empty, length, list_append, list_head, list_snoc_item, list_tail, unique }
import v2.std.algebra { HeadAbsent, HeadFound, TailAbsent, TailFound, any, contains, filter, fold_list, fold_list_right, is_empty, length, list_append, list_head, list_reverse, list_snoc_item, list_tail, unique }
import v2.std.text { Char, CharAbsent, CharFound, string_head }
import v2.std.witness { Holds, Violates, Witness }
import std.cache_identity { ArtifactKindId, CacheInterfaceId }
Expand All @@ -74,6 +74,7 @@ import v2.compiler.materialization_carriers {
parse_table_memo_materialization,
materialization_allows_memo_store,
}
import v2.extdeps.languages.dag { dag_int_literal_node_from_lexeme }
import v2.std.compilers.lexing {
Lexeme,
Token,
Expand Down Expand Up @@ -901,8 +902,8 @@ fn parse_match_arm_stmt_body(
} else {
let init = ParseMatchArmStmtAcc {
remaining: tokens,
acc_nodes: [],
acc_diags: [],
acc_nodes: Empty,
acc_diags: Empty,
done: false,
prov: prov,
table: table
Expand All @@ -911,7 +912,7 @@ fn parse_match_arm_stmt_body(
if is_empty(xs: result.acc_nodes) {
ParseExprRejected { diagnostics: [], table: result.table }
} else {
let ordered_nodes = result.acc_nodes.reverse()
let ordered_nodes = list_reverse(xs: result.acc_nodes)
let stamped = parse_stamp_match_arm_stmt_nodes(acc_nodes: ordered_nodes, prov: result.prov)
ParseExprAccepted {
remaining: result.remaining,
Expand Down Expand Up @@ -1678,13 +1679,37 @@ fn parse_expr_terminal(
true =>
match list_tail(xs: tokens) {
TailFound { tail: remaining } =>
let stamped = parse_stamp_terminal(tok: tok, stamp: stamp, prov: prov)
ParseExprAccepted {
remaining: remaining,
captured: stamped.node,
diagnostics: [],
prov: stamped.prov,
table: table
if token_class == ^dag_token_int_literal {
let minted = parse_mint_from_source(
prov: prov,
file: tok.file,
start: tok.start,
end: tok.end
)
match dag_int_literal_node_from_lexeme(
lexeme: tok.lexeme,
occurrence_id: node_occurrence_minted(id: minted.id)
) {
Accepted { value: captured, diagnostics: _ } =>
ParseExprAccepted {
remaining: remaining,
captured: captured,
diagnostics: Empty,
prov: minted.prov,
table: table
}
Rejected { diagnostics: d } =>
ParseExprRejected { diagnostics: d, table: table }
}
} else {
let stamped = parse_stamp_terminal(tok: tok, stamp: stamp, prov: prov)
ParseExprAccepted {
remaining: remaining,
captured: stamped.node,
diagnostics: [],
prov: stamped.prov,
table: table
}
}
TailAbsent => ParseExprRejected { diagnostics: [], table: table }
}
Expand Down Expand Up @@ -1945,14 +1970,14 @@ fn parse_expr_repeat(
) -> ParseExprResult {
let init = ParseRepeatAcc {
remaining: tokens,
acc_nodes: [],
acc_diags: [],
acc_nodes: Empty,
acc_diags: Empty,
done: false,
prov: prov,
table: table
}
let result = parse_expr_repeat_step(element: element, all_tokens: all_tokens, root: root, acc: init)
let stamped = parse_stamp_derived_repeat(acc_nodes: result.acc_nodes.reverse(), prov: result.prov)
let stamped = parse_stamp_derived_repeat(acc_nodes: list_reverse(xs: result.acc_nodes), prov: result.prov)
ParseExprAccepted {
remaining: result.remaining,
captured: stamped.node,
Expand Down
63 changes: 34 additions & 29 deletions src/v2/compiler/03_resolve.dag
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import std.decl_ref { DeclarationRef, WholeDeclaration }
import v2.extdeps.languages.dag {
dag_fn_decl_param_binding_atoms,
dag_language_model_canonical_symbols,
dag_node_is_int_literal_atom,
dag_node_is_module_root_conj,
dag_resolve_preserve_module_metadata_subtree,
dag_surface_module_header_metadata_edge,
Expand Down Expand Up @@ -383,40 +384,44 @@ fn try_symbol_index_atom_identity(ctx: ResolveContext, name: Symbol) -> Optional
}

fn resolve_atom(ctx: ResolveContext, n: Node, identity: Symbol) -> Outcome<Node> {
match lookup_chain(s: ctx.scope, name: identity) {
Accepted { value: found, diagnostics: pending } => match found {
Present { value: canonical } =>
Accepted {
value: canonical_atom(identity: canonical, occurrence_id: n.occurrence_id),
diagnostics: pending
}
Absent =>
match try_symbol_index_atom_identity(ctx: ctx, name: identity) {
Present { value: canonical } =>
Accepted {
value: canonical_atom(identity: canonical, occurrence_id: n.occurrence_id),
diagnostics: pending
}
Absent =>
if namespace_has_canonical_symbol(
namespace: ctx.namespace,
name: identity
) {
if dag_node_is_int_literal_atom(node: n) {
Accepted { value: n, diagnostics: None }
} else {
match lookup_chain(s: ctx.scope, name: identity) {
Accepted { value: found, diagnostics: pending } => match found {
Present { value: canonical } =>
Accepted {
value: canonical_atom(identity: canonical, occurrence_id: n.occurrence_id),
diagnostics: pending
}
Absent =>
match try_symbol_index_atom_identity(ctx: ctx, name: identity) {
Present { value: canonical } =>
Accepted {
value: canonical_atom(identity: identity, occurrence_id: n.occurrence_id),
value: canonical_atom(identity: canonical, occurrence_id: n.occurrence_id),
diagnostics: pending
}
} else {
Rejected {
diagnostics: rejected_with_pending(
pending: pending,
rejected: diagnostics_singleton(d: unbound_symbol_diagnostic(n: n))
)
Absent =>
if namespace_has_canonical_symbol(
namespace: ctx.namespace,
name: identity
) {
Accepted {
value: canonical_atom(identity: identity, occurrence_id: n.occurrence_id),
diagnostics: pending
}
} else {
Rejected {
diagnostics: rejected_with_pending(
pending: pending,
rejected: diagnostics_singleton(d: unbound_symbol_diagnostic(n: n))
)
}
}
}
}
}
}
Rejected { diagnostics: ds } => Rejected { diagnostics: ds }
}
Rejected { diagnostics: ds } => Rejected { diagnostics: ds }
}
}

Expand Down
7 changes: 2 additions & 5 deletions src/v2/compiler/04_infer.dag
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import v2.std.bounded_lattice_completeness {
partial_bounded_lattice_instances_in_tree
}
import v2.compiler.resolve { ResolvedTree }
import v2.extdeps.languages.dag { dag_node_is_int_literal_atom }
import v2.std.cardinality { TerminationProof, termination_proof_witness_for_node }
import v2.std.collection {
Absent,
Expand Down Expand Up @@ -464,11 +465,7 @@ fn infer_branch_is_bool_literal_atom(node: Node) -> Bool {
}

fn infer_branch_is_int_literal_atom(node: Node) -> Bool {
match node.kind {
TypeNode { connective: Atom { identity: id } } =>
(id == ^dag_pick_lit_one) || (id == ^dag_pick_lit_two)
_ => false
}
dag_node_is_int_literal_atom(node: node)
}

fn infer_atom_binding_sym(node: Node) -> Optional<Symbol> {
Expand Down
17 changes: 14 additions & 3 deletions src/v2/compiler/05_eval.dag
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import v2.std.node {
byte_offset_cache_key,
fold_node,
is_positional,
node_for_structural_equality,
well_formed,
SyntheticOccurrence
}
Expand Down Expand Up @@ -1144,7 +1145,7 @@ fn eval_bind_key(node: Node) -> Outcome<EnvironmentBindingKey> {
),
f: fn(e) {
Accepted {
value: EnvironmentBindingKey { declaration: e.target },
value: eval_environment_binding_key(declaration: e.target),
diagnostics: None
}
}
Expand Down Expand Up @@ -1176,9 +1177,17 @@ fn eval_binding_key_node(sym: Symbol) -> Node {
symbol_atom_node(sym: sym)
}

fn eval_environment_binding_key(declaration: Node) -> EnvironmentBindingKey {
EnvironmentBindingKey {
declaration: declaration
}
}

fn eval_runtime_binding_lookup(node: Node, environment: EvaluationEnvironment) -> Outcome<RuntimeValue> {
eval_witness_outcome(
witness: environment.bindings.lookup(EnvironmentBindingKey { declaration: node })
witness: environment.bindings.lookup(
eval_environment_binding_key(declaration: node)
)
)
}

Expand Down Expand Up @@ -1212,7 +1221,9 @@ fn eval_bind_param_edge_step(
),
f: fn(value) {
bind.bind_value(
EnvironmentBindingKey { declaration: eval_binding_key_node(sym: binding_id) },
eval_environment_binding_key(
declaration: eval_binding_key_node(sym: binding_id)
),
value,
env
)
Expand Down
Loading
Loading