use super::node::Empty;
use super::insert::With;
pub type CapSet0 = Empty;
pub type CapSet1<A> = <Empty as With<A>>::Out;
pub type CapSet2<A, B> = <<Empty as With<A>>::Out as With<B>>::Out;
pub type CapSet3<A, B, C> = <<<Empty as With<A>>::Out as With<B>>::Out as With<C>>::Out;
pub type CapSet4<A, B, C, D> = <<<<Empty as With<A>>::Out as With<B>>::Out as With<C>>::Out as With<D>>::Out;
#[macro_export]
macro_rules! capset {
() => { $crate::trie::Empty };
($cap:ty) => {
<$crate::trie::Empty as $crate::trie::With<$cap>>::Out
};
($cap:ty, $($rest:ty),+ $(,)?) => {
<$crate::capset![$($rest),+] as $crate::trie::With<$cap>>::Out
};
}
#[macro_export]
macro_rules! union {
($a:ty, $b:ty) => {
<$a as $crate::trie::SetUnion<$b>>::Out
};
}
#[macro_export]
macro_rules! intersect {
($a:ty, $b:ty) => {
<$a as $crate::trie::SetIntersect<$b>>::Out
};
}
#[macro_export]
macro_rules! with {
($cap:ty) => {
<__C as $crate::trie::With<$cap>>::Out
};
($set:ty, $cap:ty) => {
<$set as $crate::trie::With<$cap>>::Out
};
($set:ty, $cap:ty, $($rest:ty),+) => {
$crate::with![ $crate::with![$set, $cap], $($rest),+ ]
};
}
#[macro_export]
macro_rules! without {
($cap:ty) => {
<__C as $crate::trie::Without<$cap>>::Out
};
($set:ty, $cap:ty) => {
<$set as $crate::trie::Without<$cap>>::Out
};
($set:ty, $cap:ty, $($rest:ty),+) => {
$crate::without![ $crate::without![$set, $cap], $($rest),+ ]
};
}