External suspension for yielding to code outside Skuld's env threading.
Unlike InternalSuspend (which receives env at resume time), this suspension
closes over the env at suspension point. Use this when:
- Yielding values to external code that doesn't understand Skuld's env
- The Yield effect's coroutine-style suspension
- Any suspension where the caller will provide a value but not an updated env
Resume Signature
resume :: (val) -> {result, env} - closes over env from suspension point
The :data field holds decorations added by scoped effects via transform_suspend.
Default is nil to distinguish "no decorations" from "empty decorations map".
Summary
Types
@type t() :: %Skuld.Comp.ExternalSuspend{ data: map() | nil, resume: (term() -> {term(), Skuld.Comp.Env.t()}) | nil, value: term() }