diff --git a/Cargo.toml b/Cargo.toml index 8943f29..b81c43f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slotted-egraphs" -version = "0.0.26" +version = "0.0.27" edition = "2021" description = "E-Graphs with name binding" license = "Apache-2.0 OR MIT" @@ -15,7 +15,7 @@ trace = ["tracing/max_level_trace", "tracing/release_max_level_trace", "tracing" features = ["explanations"] [dependencies] -slotted-egraphs-derive = { path = "slotted-egraphs-derive" } +slotted-egraphs-derive = "=0.0.1" fnv = "1.0.7" tracing = { version = "0.1", features = ["attributes"], optional = true } diff --git a/src/lang.rs b/src/lang.rs index 7d56292..a2a503b 100644 --- a/src/lang.rs +++ b/src/lang.rs @@ -26,6 +26,8 @@ impl Language for Slot { fn num_children_hint() -> Option { Some(1) } } +/// Implements [Language] for payload types that are independent of Slots. For example u32, String etc. +#[macro_export] macro_rules! impl_slotless_lang { ($id:ident) => { impl Language for $id { @@ -44,7 +46,6 @@ macro_rules! impl_slotless_lang { impl_slotless_lang!(u32); - impl Language for Bind { fn all_slot_occurences_mut(&mut self) -> Vec<&mut Slot> { let mut v = vec![&mut self.slot];