Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
895185b
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
4108ead
Fix trait-derive witness parse errors blocking CI regen.
Jul 24, 2026
3b5a02e
Address review 42213: delete shadow nullary helpers, single elem-shap…
Jul 24, 2026
3e0e2bb
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
9b022ae
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
7ae4780
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
5029dcf
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
0eca4c0
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 24, 2026
0934c5a
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
8f18697
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
8243652
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
14c8cdb
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
59d118d
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
88dee1c
Fix trait_derive witness tests after std authority split.
Jul 24, 2026
58bc25d
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
56e12c7
Move Rust derive spellings from std to extdeps.languages.rust.emit.
Jul 24, 2026
5ebce2b
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 24, 2026
5f8f5ac
Derive rust_trait_derive_attr_from_traits via spelling table map/join.
Jul 24, 2026
e429ca2
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 24, 2026
6514a67
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
319b3e9
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
024803d
Thread v1 trait-derive shape through structure classifiers.
Jul 25, 2026
b938a54
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
fef648a
Fix ord-carrier struct derives: omit Copy for Symbol wrappers.
Jul 25, 2026
f01663b
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
a19e969
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
e11a19f
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
321e4ef
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 25, 2026
f8d09c8
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
7acad5f
Fix emit witness tests for Outcome coproduct derive bindings.
Jul 25, 2026
dff02be
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
bd87a16
Hard-fail coproduct derive binding refusal in emit test harnesses.
Jul 25, 2026
ec21eb8
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
7522b7c
Drop unused imports from trait_derive_completeness.dag.
Jul 25, 2026
5744913
Fix trait_derive witness imports: derive traits live in std.trait_der…
Jul 25, 2026
64e245d
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
a7f6d0c
Address review 42471: authority-derived derive attrs, dissolve-on sca…
Jul 25, 2026
ada06e0
Fix cargo fmt on v1_compiler_emit_rust import block.
Jul 25, 2026
c78f0d9
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
3d474b0
Drop dead match arms in v1_emit_enum_derives.
Jul 25, 2026
5fc2563
Restore wildcard refuse arm in v1_emit_enum_derives for Rust exhausti…
Jul 25, 2026
8d79e06
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 25, 2026
0f5e531
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
9c543ab
Consolidate Symbol ord-carrier shape onto trait_derive_emit (review 4…
Jul 25, 2026
f9d1f09
Fix cargo fmt on v1_compiler_trait_derive_emit long if condition.
Jul 25, 2026
14685dc
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 25, 2026
e254e8b
Attach canonical-seven no-regression receipt for #7174 foundation merge.
Jul 25, 2026
c2ab6aa
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 25, 2026
c3402ca
Merge remote-tracking branch 'origin/main' into session/silent-badger-23
Jul 25, 2026
169c568
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
5ee48a1
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
83f27bf
fix(emit): qualify Magnitude and impl PartialEq<i64> on CommutativeSe…
Jul 25, 2026
eba726c
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
af93d20
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
fe902bd
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
a14dae4
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
4b4eceb
test(emit): witness supplemental impls through v1 seed emit path
Jul 25, 2026
1410ae6
Merge remote-tracking branch 'origin/main' into session/silent-badger…
Jul 25, 2026
95e0ac9
fix(test): drop v1 import from trait_derive seed emit witness
Jul 25, 2026
1de453a
WIP: E0308 sub-wall 2: trait-derive completeness predicate (Clone/ari…
Jul 25, 2026
2de5a69
regen(stage0): Bool supplemental gate + PartialEq<i64> dissolve note
Jul 25, 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
34 changes: 34 additions & 0 deletions dag/extdeps/languages/rust/emit.dag
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,37 @@ fn rust_qualified_module_mod_basename(qualified_module: String) -> String {
fn rust_qualified_module_mod_filename(qualified_module: String) -> String {
concat(rust_qualified_module_mod_basename(qualified_module: qualified_module), ".rs")
}

data rust_repr_grounding_arm_b_dissolve_on: String = "Interim CommutativeSemiring<Magnitude> carrier arithmetic stubs dissolve when GroupCompletion/Nat body lands (#7197); replace fail-closed unimplemented! stubs with grounded i64 newtype operations. Do not retain PartialEq<i64> cross-representation bridge — numeric-tower grounding replaces the straddle."

fn rust_supplemental_impls_commutative_semiring_magnitude() -> String {
concat(
"\n// repr-grounding arm (b): Nat carrier arithmetic (v1 seed emit; ",
rust_repr_grounding_arm_b_dissolve_on,
")\n",
"impl std::ops::Add for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n",
" type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;\n",
" fn add(self, _rhs: Self) -> Self::Output { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n",
"}\n",
"impl std::ops::Mul for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n",
" type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;\n",
" fn mul(self, _rhs: Self) -> Self::Output { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n",
"}\n",
"impl std::ops::Div for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n",
" type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;\n",
" fn div(self, _rhs: Self) -> Self::Output { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n",
"}\n",
"impl std::cmp::PartialEq<i64> for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n",
" fn eq(&self, _other: &i64) -> bool { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n",
"}\n"
)
}

fn rust_supplemental_impls_bool_coproduct() -> String {
concat(
"\n// repr-grounding arm (b): Bool coproduct ↔ host bool bridge (v1 seed emit)\n",
"impl From<Bool> for bool {\n",
" fn from(b: Bool) -> bool { match b { Bool::True => true, Bool::False => false } }\n",
"}\n"
)
}
37 changes: 35 additions & 2 deletions dag/std/trait_derive_shape.dag
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module std.trait_derive_shape

import std.algebra { Cons, Empty }

data trait_derive_shape_note: String = "Target-agnostic authority for ReprGroundingDeriveTrait × ReprGroundingDeriveElemShape capability table and derive-trait list builders. Rust spellings: extdeps.languages.rust.emit. Consumed by v2.compiler.trait_derive_completeness and v1.compiler.trait_derive_emit. #7174 scope (operator 2026-07-25): v1 emit wires clone bounds + serde/Debug/Ord derives on named structs/enums only; ReprDeriveAdd/Sub/… rows on KernelInt are predicate authority for the grounding lane (GroupCompletion<Nat>, Vector), not v1 custom-impl emission."
data trait_derive_shape_note: String = "Target-agnostic authority for ReprGroundingDeriveTrait × ReprGroundingDeriveElemShape capability table and derive-trait list builders. Rust spellings: extdeps.languages.rust.emit. Consumed by v2.compiler.trait_derive_completeness and v1.compiler.trait_derive_emit. #7174 (operator 2026-07-25): v1 emit wires (a) clone bounds and (c) serde/Debug/Ord #[derive] on named structs/enums. Root-4 arm (b): predicate-gated supplemental impl { … } blocks for coproduct-native arithmetic carriers — see trait_derive_shape_grounding_lane_handoff; ReprDeriveAdd/Sub/… rows on KernelInt are capability-table authority for repr_grounding_derive_completeness_predicate, not spellings."

data trait_derive_shape_grounding_lane_handoff: String = "Arm (b) deferred to GroupCompletion grounding lane: coproduct-native arithmetic + PartialOrd/PartialEq impl blocks for algebra carriers (GroupCompletion<Nat>, Vector, CommutativeSemiring<Magnitude>). This module's capability table + repr_grounding_derive_completeness_predicate remain the shared authority; the grounding lane emits impl { … } from shape rows, not #[derive]. v1.compiler.trait_derive_emit does not wire arm (b)."
data trait_derive_shape_grounding_lane_handoff: String = "Root-4 arm (b): coproduct-native arithmetic + PartialOrd/PartialEq impl blocks for algebra carriers (GroupCompletion<Nat>, Vector, CommutativeSemiring<Magnitude>). Capability table + repr_grounding_derive_completeness_predicate remain the shared authority; v1.compiler.trait_derive_emit emits impl { … } from shape rows (not #[derive]) through the seed emitter. dissolve-on: GroupCompletion/FieldOfFractions body landing (#7197) replaces interim Magnitude-carrier stubs."

data trait_derive_shape_dissolve_on: String = "ReprGroundingDeriveTrait members that name Rust-specific authorities (ReprDeriveSerialize, ReprDeriveAdd, …) migrate beside each target's spelling table when a second consumer exists; until then capability roles stay in std/ with spellings in extdeps.languages.rust.emit."

Expand Down Expand Up @@ -248,3 +248,36 @@ fn payload_coproduct_derive_traits() -> List<ReprGroundingDeriveTrait> {
}
}
}

fn kernel_int_arithmetic_traits() -> List<ReprGroundingDeriveTrait> {
Cons {
head: ReprDeriveAdd,
tail: Cons {
head: ReprDeriveSub,
tail: Cons {
head: ReprDeriveMul,
tail: Cons {
head: ReprDeriveDiv,
tail: Cons {
head: ReprDeriveRem,
tail: Cons {
head: ReprDeriveNeg,
tail: Cons {
head: ReprDerivePartialEq,
tail: Cons { head: ReprDerivePartialOrd, tail: Empty }
}
}
}
}
}
}
}
}

fn repr_grounding_supplemental_commutative_semiring_target(module_path: String, name: String) -> Bool {
module_path == "std.algebra" && name == "CommutativeSemiring"
}

fn repr_grounding_supplemental_bool_host_bridge_target(module_path: String, name: String) -> Bool {
module_path == "std.types" && name == "Bool"
}
10 changes: 7 additions & 3 deletions src/v1/05_emit_rust.dag
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import v1.compiler.closure_stub_v2_std_text_rust { closure_stub_v2_std_text_sour
import v1.compiler.coercion { coerce_primitive_type, is_copy, lookup_checkpoint }
import v1.compiler.trait_derive_emit {
v1_emit_struct_derives, v1_emit_enum_derives,
v1_emit_struct_supplemental_impls, v1_emit_enum_supplemental_impls,
v1_generic_params_needing_clone_bound, v1_emit_type_params_with_clone_bounds,
rust_nominal_identity_carrier_shape_eligible, rust_symbol_wrapped_ord_carrier_shape_eligible
}
Expand Down Expand Up @@ -4735,7 +4736,9 @@ fn emit_struct_from_children(name: String, type_params: String, generic_param_na
concat(field_lines, [concat(" ", rust_visibility_prefix(), rust_phantom_field_name(), ": std::marker::PhantomData<", rust_phantom_marker_inner(unused: unused_params), ">,")])
} else { field_lines }
let fields_str = all_field_lines |> join(separator: "\n")
concat(derives, "\n", rust_visibility_prefix(), rust_items().struct_keyword, " ", name, type_params, " {\n", fields_str, "\n}")
let struct_def = concat(derives, "\n", rust_visibility_prefix(), rust_items().struct_keyword, " ", name, type_params, " {\n", fields_str, "\n}")
let supplemental = v1_emit_struct_supplemental_impls(module_path: env.module_path, name: name)
if supplemental == "" { struct_def } else { concat(struct_def, supplemental) }
}
}

Expand Down Expand Up @@ -4851,8 +4854,9 @@ fn emit_enum_from_children(name: String, type_params: String, generic_param_name
let tag_line = if serde_policy.enum_attr == "" { "" } else { concat(serde_policy.enum_attr, "\n") }
let enum_def = concat(derives, "\n", tag_line, rust_visibility_prefix(), rust_items().enum_keyword, " ", name, type_params, " {\n", variants_str, "\n}")
let accessor_impl = emit_enum_shared_accessors(name: name, type_params: type_params, generic_param_names: generic_param_names, children: children, recursive_types: recursive_types, shared_types: shared_types, env: env, emit_info: emit_info)
if accessor_impl == "" { enum_def }
else { concat(enum_def, "\n", accessor_impl) }
let supplemental = v1_emit_enum_supplemental_impls(module_path: env.module_path, name: name)
let with_accessors = if accessor_impl == "" { enum_def } else { concat(enum_def, "\n", accessor_impl) }
if supplemental == "" { with_accessors } else { concat(with_accessors, supplemental) }
}

fn find_shared_enum_fields(children: List<Node>, env: TypeEnv) -> List<String> {
Expand Down
17 changes: 17 additions & 0 deletions src/v1/stage0/src/extdeps_languages_rust_emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,3 +628,20 @@ pub fn rust_qualified_module_mod_filename(qualified_module: String) -> String {
".rs".to_string(),
)
}

pub fn rust_repr_grounding_arm_b_dissolve_on() -> String {
thread_local! {
static CACHED: String = {
"Interim CommutativeSemiring<Magnitude> carrier arithmetic stubs dissolve when GroupCompletion/Nat body lands (#7197); replace fail-closed unimplemented! stubs with grounded i64 newtype operations. Do not retain PartialEq<i64> cross-representation bridge — numeric-tower grounding replaces the straddle.".to_string()
};
}
CACHED.with(|c: &String| c.clone())
}

pub fn rust_supplemental_impls_commutative_semiring_magnitude() -> String {
v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("\n// repr-grounding arm (b): Nat carrier arithmetic (v1 seed emit; ".to_string(), rust_repr_grounding_arm_b_dissolve_on()), ")\n".to_string()), "impl std::ops::Add for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n".to_string()), " type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;\n".to_string()), " fn add(self, _rhs: Self) -> Self::Output { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n".to_string()), "}\n".to_string()), "impl std::ops::Mul for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n".to_string()), " type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;\n".to_string()), " fn mul(self, _rhs: Self) -> Self::Output { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n".to_string()), "}\n".to_string()), "impl std::ops::Div for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n".to_string()), " type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;\n".to_string()), " fn div(self, _rhs: Self) -> Self::Output { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n".to_string()), "}\n".to_string()), "impl std::cmp::PartialEq<i64> for CommutativeSemiring<crate::std_magnitude::Magnitude> {\n".to_string()), " fn eq(&self, _other: &i64) -> bool { unimplemented!(\"interim CommutativeSemiring<Magnitude> stub — see #7197\") }\n".to_string()), "}\n".to_string())
}

pub fn rust_supplemental_impls_bool_coproduct() -> String {
v1_rt::concat(v1_rt::concat(v1_rt::concat("\n// repr-grounding arm (b): Bool coproduct ↔ host bool bridge (v1 seed emit)\n".to_string(), "impl From<Bool> for bool {\n".to_string()), " fn from(b: Bool) -> bool { match b { Bool::True => true, Bool::False => false } }\n".to_string()), "}\n".to_string())
}
24 changes: 24 additions & 0 deletions src/v1/stage0/src/std_algebra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,30 @@ pub struct CommutativeSemiring<T> {
pub one: T,
pub _phantom: std::marker::PhantomData<T>,
}
// repr-grounding arm (b): Nat carrier arithmetic (v1 seed emit; Interim CommutativeSemiring<Magnitude> carrier arithmetic stubs dissolve when GroupCompletion/Nat body lands (#7197); replace fail-closed unimplemented! stubs with grounded i64 newtype operations. Do not retain PartialEq<i64> cross-representation bridge — numeric-tower grounding replaces the straddle.)
impl std::ops::Add for CommutativeSemiring<crate::std_magnitude::Magnitude> {
type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;
fn add(self, _rhs: Self) -> Self::Output {
unimplemented!("interim CommutativeSemiring<Magnitude> stub — see #7197")
}
}
impl std::ops::Mul for CommutativeSemiring<crate::std_magnitude::Magnitude> {
type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;
fn mul(self, _rhs: Self) -> Self::Output {
unimplemented!("interim CommutativeSemiring<Magnitude> stub — see #7197")
}
}
impl std::ops::Div for CommutativeSemiring<crate::std_magnitude::Magnitude> {
type Output = std::rc::Rc<CommutativeSemiring<crate::std_magnitude::Magnitude>>;
fn div(self, _rhs: Self) -> Self::Output {
unimplemented!("interim CommutativeSemiring<Magnitude> stub — see #7197")
}
}
impl std::cmp::PartialEq<i64> for CommutativeSemiring<crate::std_magnitude::Magnitude> {
fn eq(&self, _other: &i64) -> bool {
unimplemented!("interim CommutativeSemiring<Magnitude> stub — see #7197")
}
}

#[derive(Clone)]
pub struct Ring<T> {
Expand Down
63 changes: 61 additions & 2 deletions src/v1/stage0/src/std_trait_derive_shape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use std::rc::Rc;
pub fn trait_derive_shape_note() -> String {
thread_local! {
static CACHED: String = {
"Target-agnostic authority for ReprGroundingDeriveTrait × ReprGroundingDeriveElemShape capability table and derive-trait list builders. Rust spellings: extdeps.languages.rust.emit. Consumed by v2.compiler.trait_derive_completeness and v1.compiler.trait_derive_emit. #7174 scope (operator 2026-07-25): v1 emit wires clone bounds + serde/Debug/Ord derives on named structs/enums only; ReprDeriveAdd/Sub/… rows on KernelInt are predicate authority for the grounding lane (GroupCompletion<Nat>, Vector), not v1 custom-impl emission.".to_string()
"Target-agnostic authority for ReprGroundingDeriveTrait × ReprGroundingDeriveElemShape capability table and derive-trait list builders. Rust spellings: extdeps.languages.rust.emit. Consumed by v2.compiler.trait_derive_completeness and v1.compiler.trait_derive_emit. #7174 (operator 2026-07-25): v1 emit wires (a) clone bounds and (c) serde/Debug/Ord #[derive] on named structs/enums. Root-4 arm (b): predicate-gated supplemental impl { … } blocks for coproduct-native arithmetic carriers — see trait_derive_shape_grounding_lane_handoff; ReprDeriveAdd/Sub/… rows on KernelInt are capability-table authority for repr_grounding_derive_completeness_predicate, not spellings.".to_string()
};
}
CACHED.with(|c: &String| c.clone())
Expand All @@ -25,7 +25,7 @@ pub fn trait_derive_shape_note() -> String {
pub fn trait_derive_shape_grounding_lane_handoff() -> String {
thread_local! {
static CACHED: String = {
"Arm (b) deferred to GroupCompletion grounding lane: coproduct-native arithmetic + PartialOrd/PartialEq impl blocks for algebra carriers (GroupCompletion<Nat>, Vector, CommutativeSemiring<Magnitude>). This module's capability table + repr_grounding_derive_completeness_predicate remain the shared authority; the grounding lane emits impl { … } from shape rows, not #[derive]. v1.compiler.trait_derive_emit does not wire arm (b).".to_string()
"Root-4 arm (b): coproduct-native arithmetic + PartialOrd/PartialEq impl blocks for algebra carriers (GroupCompletion<Nat>, Vector, CommutativeSemiring<Magnitude>). Capability table + repr_grounding_derive_completeness_predicate remain the shared authority; v1.compiler.trait_derive_emit emits impl { … } from shape rows (not #[derive]) through the seed emitter. dissolve-on: GroupCompletion/FieldOfFractions body landing (#7197) replaces interim Magnitude-carrier stubs.".to_string()
};
}
CACHED.with(|c: &String| c.clone())
Expand Down Expand Up @@ -382,6 +382,65 @@ pub fn payload_coproduct_derive_traits() -> Rc<Vec<ReprGroundingDeriveTrait>> {
})
}

pub fn kernel_int_arithmetic_traits() -> Rc<Vec<ReprGroundingDeriveTrait>> {
Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new({
let mut __cons_v = (*Rc::new(vec![])).clone();
__cons_v
.insert(0, ReprGroundingDeriveTrait::ReprDerivePartialOrd);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDerivePartialEq);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDeriveNeg);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDeriveRem);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDeriveDiv);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDeriveMul);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDeriveSub);
__cons_v
}))
.clone();
__cons_v.insert(0, ReprGroundingDeriveTrait::ReprDeriveAdd);
__cons_v
})
}

pub fn repr_grounding_supplemental_commutative_semiring_target(
module_path: String,
name: String,
) -> bool {
((module_path.clone() == "std.algebra".to_string())
&& (name.clone() == "CommutativeSemiring".to_string()))
}

pub fn repr_grounding_supplemental_bool_host_bridge_target(
module_path: String,
name: String,
) -> bool {
((module_path.clone() == "std.types".to_string()) && (name.clone() == "Bool".to_string()))
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct ReprDeriveDebug;
#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
Expand Down
9 changes: 9 additions & 0 deletions src/v1/stage0/src/std_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ pub enum Bool {
True,
False,
}
// repr-grounding arm (b): Bool coproduct ↔ host bool bridge (v1 seed emit)
impl From<Bool> for bool {
fn from(b: Bool) -> bool {
match b {
Bool::True => true,
Bool::False => false,
}
}
}

pub type Json = serde_json::Value;

Expand Down
Loading
Loading