pub struct Deriver;Expand description
The main derivation engine.
Transforms categorical specifications into type systems using the Curry-Howard-Lambek correspondence.
Implementations§
Source§impl Deriver
impl Deriver
Sourcepub fn derive(spec: &CategorySpec) -> TypeSystem
pub fn derive(spec: &CategorySpec) -> TypeSystem
Derive a type system from a categorical specification.
This is the main entry point for derivation.
§Example
use csw_core::CategoryBuilder;
use csw_derive::Deriver;
let ccc = CategoryBuilder::new("STLC")
.with_terminal()
.with_products()
.with_exponentials()
.cartesian()
.build()
.unwrap();
let ts = Deriver::derive(&ccc);
assert_eq!(ts.name, "STLC");Auto Trait Implementations§
impl Freeze for Deriver
impl RefUnwindSafe for Deriver
impl Send for Deriver
impl Sync for Deriver
impl Unpin for Deriver
impl UnwindSafe for Deriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more