v0.4.0
Fixed
-
invoke!inside#[effectful(..., send)]functions — previously failed to compile due to a compiler limitation (rust-lang/rust#100013) where the compiler could not prove thatForwardEffects::forward's return type wasSend. Internally replaced with synchronous coproduct conversions (EmbedEffect/ProjectResume) that the compiler handles correctly. -
Sequential
invoke!calls with mutable borrows —invoke!previously required sub-programs to borrow for the entire outer computation's lifetime, preventing patterns likeinvoke!(sub(&mut state)); state.mutate(); invoke!(sub(&mut state));. Sub-programs can now borrow from shorter-lived data than the outer program. -
invoke!with overlapping resume types — fixed an index inference bug where multiple effects sharing the same resume type (e.g., both resuming with()) caused incorrect dispatch.
Changed
-
Manual
Effectimpls requireshorten_resume— theEffecttrait now includes ashorten_resumemethod that witnesses the covariance ofResume<'r>in'r. This is needed byinvoketo safely shorten resume lifetimes when composing programs. The body is always justresume. The#[effect]macro generates it automatically, so this only affects hand-writtenimpl Effectblocks. -
ForwardEffectstrait removed — replaced internally byEmbedEffectandProjectResume. This trait was not part of the public API.