Add PartialEq to BoundKind and Value

Implement PartialEq for BoundKind to allow for structural equality
checks during optimization. This enables the optimizer to terminate
early when a node no longer changes.

Also, implement PartialEq for Value to facilitate comparisons between
different Value variants.
This commit is contained in:
Michael Schimmel
2026-02-21 20:01:58 +01:00
parent 56b8e8389b
commit f980d9befc
4 changed files with 84 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ impl From<&str> for Symbol {
}
/// A generic AST Node wrapper to preserve identity and metadata
#[derive(Debug, Clone)]
#[derive(Debug, Clone, PartialEq)]
pub struct Node<K, T = ()> {
pub identity: Identity,
pub kind: K,