Correctly halts

This commit is contained in:
2025-09-16 22:54:14 +02:00
parent ee45dbd28e
commit 7971a2b4eb
29 changed files with 381 additions and 195 deletions

View File

@@ -3,6 +3,7 @@ use std::fmt;
use std::rc::Rc;
use never::Never;
use orchid_base::format::{FmtCtx, FmtUnit};
use orchid_base::interner::Tok;
use orchid_base::name::Sym;
use orchid_extension::atom::Atomic;
@@ -56,4 +57,15 @@ impl OwnedAtom for RecurState {
Self::Recursive { .. } => Some(()),
})
}
async fn print_atom<'a>(&'a self, _: &'a (impl FmtCtx + ?Sized + 'a)) -> FmtUnit {
self.to_string().into()
}
}
impl fmt::Display for RecurState {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Bottom => write!(f, "RecurState::Bottom"),
Self::Recursive { path, prev } => write!(f, "{path}\n{prev}"),
}
}
}