Significantly extended stdlib
Some checks failed
Rust / build (push) Has been cancelled

This commit is contained in:
2026-01-27 20:53:45 +01:00
parent 66e5a71032
commit 534f08b45c
42 changed files with 635 additions and 211 deletions

View File

@@ -13,7 +13,7 @@ use crate::atom::Atomic;
use crate::atom_owned::{OwnedAtom, OwnedVariant};
use crate::conv::{ToExpr, TryFromExpr};
use crate::expr::Expr;
use crate::gen_expr::{GExpr, arg, call, lambda, seq};
use crate::gen_expr::{GExpr, arg, call, lambda, new_atom, seq};
enum Command {
Execute(GExpr, Sender<Expr>),
@@ -34,11 +34,11 @@ impl BuilderCoroutine {
None => panic!("Before the stream ends, we should have gotten a Halt"),
Some(Command::Halt(expr)) => expr,
Some(Command::Execute(expr, reply)) => call(
lambda(0, [seq([arg(0)], call(Replier { reply, builder: self }.to_gen().await, [arg(0)]))]),
lambda(0, [seq([arg(0)], call(new_atom(Replier { reply, builder: self }), [arg(0)]))]),
[expr],
),
Some(Command::Register(expr, reply)) =>
call(Replier { reply, builder: self }.to_gen().await, [expr]),
call(new_atom(Replier { reply, builder: self }), [expr]),
}
}
}