use preserves::value::IOValue;
use preserves_schema_macros::compile_preserves_schemas;

compile_preserves_schemas!(
    crate::schemas,
    load("<CARGO_MANIFEST_DIR>/../../../../path/path.bin"),
    external_module(EntityRef = crate::demo_entity_ref),
);

pub mod demo_entity_ref {
    use preserves::value::IOValue;
    pub type Cap = IOValue;
}

preserves_schema::define_language!(language(): Language<IOValue> {
    demo: crate::schemas::Language,
});

fn main() {
    use crate::schemas::path::*;
    use preserves::value::NestedValue;
    use preserves_schema::support::Unparse;
    println!("Hello, world! {:?}", (Filter::Compare {
        op: Box::new(Comparison::Eq),
        literal: IOValue::new(123),
    }).unparse(language()));
}
