use crate::two_category::TwoCategory;
pub trait Bicategory: TwoCategory {
fn associator<A: 'static, B: 'static, C: 'static, D: 'static>() -> Self::TwoMorphism;
fn left_unitor<A: 'static, B: 'static>() -> Self::TwoMorphism;
fn right_unitor<A: 'static, B: 'static>() -> Self::TwoMorphism;
}
#[cfg(any(feature = "std", feature = "alloc"))]
impl Bicategory for crate::two_category::Cat {
fn associator<A: 'static, B: 'static, C: 'static, D: 'static>() -> Self::TwoMorphism {}
fn left_unitor<A: 'static, B: 'static>() -> Self::TwoMorphism {}
fn right_unitor<A: 'static, B: 'static>() -> Self::TwoMorphism {}
}
#[cfg(all(test, any(feature = "std", feature = "alloc")))]
mod tests {
use super::*;
use crate::two_category::Cat;
#[test]
fn cat_associator_exists() {
let _a = Cat::associator::<i32, &str, bool, f64>();
}
#[test]
fn cat_unit_existence() {
let _l = Cat::left_unitor::<i32, &str>();
let _r = Cat::right_unitor::<i32, &str>();
}
}