// pub type V = preserves::value::ArcValue;
// type Map = std::collections::BTreeMap;
// type Set = std::collections::BTreeSet;
// type Bag = super::bag::BTreeBag;
// pub enum Event {
// Removed,
// Message,
// Added,
// }
// type Path = Vec;
// type Paths = Vec;
// type Captures = Vec;
// trait HandleEvent {
// fn handle_event<'a>(self, captures: &Captures);
// }
// pub enum Skeleton {
// Blank,
// Guarded(Guard, Vec)
// }
// pub struct AnalysisResults {
// skeleton: Skeleton,
// const_paths: Paths,
// const_vals: Vec,
// capture_paths: Paths,
// assertion: V,
// }
// pub struct Index {
// all_assertions: Bag,
// }
// impl Index {
// pub fn new() -> Self {
// Index{ all_assertions: Bag::new() }
// }
// // pub fn add_handler(analysis_results: AnalysisResults,
// }
// struct Node {
// continuation: Continuation,
// edges: Map>,
// }
// struct Continuation {
// cached_assertions: Set,
// leaf_map: Map, Leaf>>,
// }
// struct Selector {
// pop_count: usize,
// index: usize,
// }
// pub enum Guard {
// Rec(V, usize),
// Seq(usize),
// }
// struct Leaf { // aka Topic
// cached_assertions: Set,
// handler_map: Map,
// }
// struct Handler {
// cached_captures: Bag,
// callbacks: Set>,
// }