Separated orchid-host and orchid-extension

This is an architectural change that allows me to implment specifics first and generalize along observed symmetries in orchid-base
This commit is contained in:
2024-05-01 21:20:17 +02:00
parent aa3f7e99ab
commit bc3b10674b
25 changed files with 562 additions and 357 deletions

View File

@@ -1,12 +1,13 @@
//! Various elemental components to build expression trees that all implement
//! [GenClause].
use orchid_api::atom::Atom;
use super::traits::{GenClause, Generable};
use crate::host::AtomHand;
/// A trivial atom
#[derive(Clone, Debug)]
pub struct SysAtom(pub AtomHand);
pub struct SysAtom(pub Atom);
impl GenClause for SysAtom {
fn generate<T: Generable>(&self, ctx: T::Ctx<'_>, _: &impl Fn() -> T) -> T {
T::atom(ctx, self.0.clone())