forked from Orchid/orchid
Correctly halts
This commit is contained in:
@@ -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}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user