#[macro_export]
macro_rules! GhtTypeWithSchema {
(() => () => $( $schema:ty ),+ : $storage:ident) => (
$crate::ght::GhtLeaf::<$( $schema ),*, () >
);
(() => $( $z:ty ),* => $schema:ty : $storage:ident) => (
$crate::ght::GhtLeaf::<$schema, $crate::variadics::var_type!($( $z ),*), $crate::variadics::variadic_collections::$storage<$schema> >
);
($a:ty => () => $schema:ty : $storage:ident) => (
$crate::ght::GhtInner::<$a, $crate::ght::GhtLeaf::<$schema, (), $crate::variadics::variadic_collections::$storage<$schema> >>
);
($a:ty => $( $z:ty ),* => $schema:ty : $storage:ident) => (
$crate::ght::GhtInner::<$a, $crate::ght::GhtLeaf::<$schema, $crate::variadics::var_type!($( $z ),*), $crate::variadics::variadic_collections::$storage<$schema> >>
);
($a:ty, $( $b:ty ),* => () => $schema:ty : $storage:ident) => (
$crate::ght::GhtInner::<$a, $crate::GhtTypeWithSchema!($( $b ),* => () => $schema : $storage)>
);
($a:ty, $( $b:ty ),* => $( $z:ty ),* => $schema:ty : $storage:ident) => (
$crate::ght::GhtInner::<$a, $crate::GhtTypeWithSchema!($( $b ),* => $( $z ),* => $schema : $storage)>
);
}
#[macro_export]
macro_rules! GhtType {
(() => $( $z:ty ),*: $storage:ident) => (
$crate::GhtTypeWithSchema!(() => $( $z ),* => $crate::variadics::var_type!($( $z ),*): $storage)
);
($( $b:ty ),* => (): $storage:ident) => (
$crate::GhtTypeWithSchema!($( $b ),* => () => $crate::variadics::var_type!($( $b ),*): $storage)
);
($( $b:ty ),* => $( $z:ty ),*: $storage:ident) => (
$crate::GhtTypeWithSchema!($( $b ),* => $( $z ),* => $crate::variadics::var_type!($( $b ),*, $( $z ),*): $storage)
);
}
#[macro_export]
macro_rules! ColtType {
($a:ty => ()) => {
$crate::variadics::var_type!($crate::GhtType!($a => (): VariadicColumnMultiset))
};
($a:ty => $c:ty) => {
($crate::GhtType!($a => $c: VariadicColumnMultiset), $crate::ColtType!($a, $c => ()))
};
($a:ty => $c:ty, $( $d:ty ),*) => {
($crate::GhtType!($a => $c, $( $d ),*: VariadicColumnMultiset), $crate::ColtType!($a, $c => $( $d ),*))
};
($a:ty, $( $b:ty ),* => ()) => {
$crate::variadics::var_type!($crate::GhtType!($a, $( $b ),* => (): VariadicColumnMultiset))
};
($a:ty, $( $b:ty ),* => $c:ty) => {
($crate::GhtType!($a, $( $b ),* => $c: VariadicColumnMultiset), $crate::ColtType!($a, $( $b ),*, $c => ()))
};
($a:ty, $( $b:ty ),* => $c:ty, $( $d:ty ),*) => {
($crate::GhtType!($a, $( $b ),* => $c, $( $d ),*: VariadicColumnMultiset), $crate::ColtType!($a, $( $b ),*, $c => $( $d ),*))
};
($a:ty) => {
($crate::GhtType!(() => $a: VariadicColumnMultiset), $crate::ColtType!($a => ()))
};
($a:ty, $( $b:ty ),*) => {
($crate::GhtType!(() => $a, $( $b ),*: VariadicColumnMultiset), $crate::ColtType!($a => $( $b ),*))
};
}