Made some progress towards effectful programs

This commit is contained in:
2026-04-18 13:25:03 +00:00
parent 286040c3ec
commit 6eed6b9831
7 changed files with 241 additions and 23 deletions

View File

@@ -5,7 +5,10 @@ use std::num::NonZero;
use orchid_api_traits::Coding;
use orchid_base::BoxedIter;
use crate::{AtomOps, AtomTypeId, Atomic, AtomicFeatures, Fun, Lambda, Replier, SystemCtor};
use crate::{
AtomOps, AtomTypeId, Atomic, AtomicFeatures, CmdAtom, Fun, Lambda, ReaderAtom, Replier,
SystemCtor, WriterAtom,
};
/// Description of a system. This is intended to be a ZST storing the static
/// properties of a [SystemCtor] which should be known to foreign systems
@@ -56,5 +59,13 @@ pub(crate) trait DynSystemCardExt: DynSystemCard {
/// The indices of these are bitwise negated, such that the MSB of an atom index
/// marks whether it belongs to this package (0) or the importer (1)
pub(crate) fn general_atoms() -> impl Iterator<Item = Option<Box<dyn AtomOps>>> {
[Some(Fun::ops()), Some(Lambda::ops()), Some(Replier::ops())].into_iter()
[
Some(Fun::ops()),
Some(Lambda::ops()),
Some(Replier::ops()),
Some(CmdAtom::ops()),
Some(WriterAtom::ops()),
Some(ReaderAtom::ops()),
]
.into_iter()
}