Versions in this module Expand all Collapse all v0 v0.1.4 Feb 27, 2026 v0.1.3 Feb 24, 2026 Changes in this version + type UnwindFrame struct + Data1 Erased + Data2 Erased + Data3 Erased + Unwind func(Data1, Data2, Data3, current Erased) (Erased, Frame) + func AcquireUnwindFrame() *UnwindFrame v0.1.2 Feb 22, 2026 Changes in this version type BindFrame + func AcquireBindFrame() *BindFrame[Erased, Erased] type EffectFrame + func AcquireEffectFrame() *EffectFrame[Erased] type ThenFrame + func AcquireThenFrame() *ThenFrame[Erased, Erased] v0.1.1 Feb 18, 2026 Changes in this version + type Eff = Cont[Resumed, A] + func Pure[A any](a A) Eff[A] + type Phantom struct + func (Phantom[A]) OpResult() A v0.1.0 Feb 14, 2026 Changes in this version + func EvalState[S, A any](initial S, m Cont[Resumed, A]) A + func ExecStateError[S, E, A any](initial S, m Cont[Resumed, A]) S + func ExecState[S, A any](initial S, m Cont[Resumed, A]) S + func ExecWriter[W, A any](m Cont[Resumed, A]) []W + func HandleExpr[H Handler[H, R], R any](m Expr[R], h H) R + func HandleFunc[R any](f func(op Operation) (Resumed, bool)) *handlerFunc[R] + func Handle[H Handler[H, R], R any](m Cont[Resumed, R], h H) R + func MatchEither[E, A, T any](e Either[E, A], onLeft func(E) T, onRight func(A) T) T + func ReaderHandler[E, R any](env E) *readerHandler[E, R] + func RunPure[A any](c Expr[A]) A + func RunReaderExpr[E, A any](env E, m Expr[A]) A + func RunReader[E, A any](env E, m Cont[Resumed, A]) A + func RunStateExpr[S, A any](initial S, m Expr[A]) (A, S) + func RunStateReaderExpr[S, E, A any](initial S, env E, m Expr[A]) (A, S) + func RunStateReader[S, E, A any](initial S, env E, m Cont[Resumed, A]) (A, S) + func RunStateWriterExpr[S, W, A any](initial S, m Expr[A]) (A, S, []W) + func RunStateWriter[S, W, A any](initial S, m Cont[Resumed, A]) (A, S, []W) + func RunState[S, A any](initial S, m Cont[Resumed, A]) (A, S) + func RunWith[R, A any](m Cont[R, A], k func(A) R) R + func RunWriterExpr[W, A any](m Expr[A]) (A, []W) + func RunWriter[W, A any](m Cont[Resumed, A]) (A, []W) + func Run[A any](m Cont[A, A]) A + func StateHandler[S, R any](initial S) (*stateHandler[S, R], func() S) + func WriterHandler[W, R any]() (*writerHandler[W, R], func() []W) + type Affine struct + func Once[R, A any](k func(A) R) *Affine[R, A] + func (a *Affine[R, A]) Discard() + func (a *Affine[R, A]) Resume(v A) R + func (a *Affine[R, A]) TryResume(v A) (R, bool) + type Ask struct + func (Ask[E]) DispatchReader(env *E) (Resumed, bool) + func (Ask[E]) OpResult() E + type BindFrame struct + F func(A) Expr[B] + Next Frame + func (f *BindFrame[A, B]) Unwind(current Erased) (Erased, Frame) + type Catch struct + Body Cont[Resumed, A] + Handler func(E) Cont[Resumed, A] + func (Catch[E, A]) OpResult() A + func (o Catch[E, A]) DispatchError(ctx *ErrorContext[E]) (Resumed, bool) + type Censor struct + Body Cont[Resumed, A] + F func([]W) []W + func (Censor[W, A]) OpResult() A + func (o Censor[W, A]) DispatchWriter(ctx *WriterContext[W]) (Resumed, bool) + type Cont func(k func(A) R) R + func AskReader[E, B any](f func(E) Cont[Resumed, B]) Cont[Resumed, B] + func Bind[R, A, B any](m Cont[R, A], f func(A) Cont[R, B]) Cont[R, B] + func Bracket[E, R, A any](acquire Cont[Resumed, R], release func(R) Cont[Resumed, struct{}], ...) Cont[Resumed, Either[E, A]] + func CatchError[E, A any](body Cont[Resumed, A], handler func(E) Cont[Resumed, A]) Cont[Resumed, A] + func CensorWriter[W, A any](f func([]W) []W, body Cont[Resumed, A]) Cont[Resumed, A] + func GetState[S, B any](f func(S) Cont[Resumed, B]) Cont[Resumed, B] + func ListenWriter[W, A any](body Cont[Resumed, A]) Cont[Resumed, Pair[A, []W]] + func MapReader[E, A any](f func(E) A) Cont[Resumed, A] + func Map[R, A, B any](m Cont[R, A], f func(A) B) Cont[R, B] + func ModifyState[S, B any](f func(S) S, then func(S) Cont[Resumed, B]) Cont[Resumed, B] + func OnError[E, A any](body Cont[Resumed, A], cleanup func(E) Cont[Resumed, struct{}]) Cont[Resumed, A] + func Perform[O Op[O, A], A any](op O) Cont[Resumed, A] + func PutState[S, B any](s S, next Cont[Resumed, B]) Cont[Resumed, B] + func Reflect[A any](m Expr[A]) Cont[Resumed, A] + func Reset[R, A any](m Cont[A, A]) Cont[R, A] + func Return[R, A any](a A) Cont[R, A] + func Shift[R, A any](f func(k func(A) R) R) Cont[R, A] + func Suspend[R, A any](f func(func(A) R) R) Cont[R, A] + func TellWriter[W, B any](w W, next Cont[Resumed, B]) Cont[Resumed, B] + func Then[R, A, B any](m Cont[R, A], n Cont[R, B]) Cont[R, B] + func ThrowError[E, A any](err E) Cont[Resumed, A] + type EffectFrame struct + Next Frame + Operation Operation + Resume func(A) Erased + type Either struct + func EvalStateError[S, E, A any](initial S, m Cont[Resumed, A]) Either[E, A] + func FlatMapEither[E, A, B any](e Either[E, A], f func(A) Either[E, B]) Either[E, B] + func Left[E, A any](e E) Either[E, A] + func MapEither[E, A, B any](e Either[E, A], f func(A) B) Either[E, B] + func MapLeftEither[E, F, A any](e Either[E, A], f func(E) F) Either[F, A] + func Right[E, A any](a A) Either[E, A] + func RunErrorExpr[E, A any](m Expr[A]) Either[E, A] + func RunError[E, A any](m Cont[Resumed, A]) Either[E, A] + func RunReaderStateErrorExpr[Env, S, Err, A any](env Env, initial S, m Expr[A]) (Either[Err, A], S) + func RunReaderStateError[Env, S, Err, A any](env Env, initial S, m Cont[Resumed, A]) (Either[Err, A], S) + func RunStateErrorExpr[S, E, A any](initial S, m Expr[A]) (Either[E, A], S) + func RunStateError[S, E, A any](initial S, m Cont[Resumed, A]) (Either[E, A], S) + func (e Either[E, A]) GetLeft() (E, bool) + func (e Either[E, A]) GetRight() (A, bool) + func (e Either[E, A]) IsLeft() bool + func (e Either[E, A]) IsRight() bool + type Erased = any + type ErrorContext struct + Err E + HasErr bool + type Expr struct + Frame Frame + Value A + func ExprBind[A, B any](m Expr[A], f func(A) Expr[B]) Expr[B] + func ExprMap[A, B any](m Expr[A], f func(A) B) Expr[B] + func ExprPerform[O Op[O, A], A any](op O) Expr[A] + func ExprReturn[A any](a A) Expr[A] + func ExprSuspend[A any](frame Frame) Expr[A] + func ExprThen[A, B any](m Expr[A], n Expr[B]) Expr[B] + func ExprThrowError[E, A any](err E) Expr[A] + func Reify[A any](m Cont[Resumed, A]) Expr[A] + type Frame interface + func ChainFrames(first, second Frame) Frame + type Get struct + func (Get[S]) DispatchState(state *S) (Resumed, bool) + func (Get[S]) OpResult() S + type Handler interface + Dispatch func(op Operation) (Resumed, bool) + type Listen struct + Body Cont[Resumed, A] + func (Listen[W, A]) OpResult() Pair[A, []W] + func (o Listen[W, A]) DispatchWriter(ctx *WriterContext[W]) (Resumed, bool) + type MapFrame struct + F func(A) B + Next Frame + func (f *MapFrame[A, B]) Unwind(current Erased) (Erased, Frame) + type Modify struct + F func(S) S + func (Modify[S]) OpResult() S + func (o Modify[S]) DispatchState(state *S) (Resumed, bool) + type Op interface + OpResult func() A + type Operation any + type Pair struct + Fst A + Snd B + type Put struct + Value S + func (Put[S]) OpResult() struct{} + func (o Put[S]) DispatchState(state *S) (Resumed, bool) + type Resumed any + type ReturnFrame struct + type Suspension struct + func StepExpr[A any](m Expr[A]) (A, *Suspension[A]) + func Step[A any](m Cont[Resumed, A]) (A, *Suspension[A]) + func (s *Suspension[A]) Discard() + func (s *Suspension[A]) Op() Operation + func (s *Suspension[A]) Resume(v Resumed) (A, *Suspension[A]) + func (s *Suspension[A]) TryResume(v Resumed) (A, *Suspension[A], bool) + type Tell struct + Value W + func (Tell[W]) OpResult() struct{} + func (o Tell[W]) DispatchWriter(ctx *WriterContext[W]) (Resumed, bool) + type ThenFrame struct + Next Frame + Second Expr[B] + func (f *ThenFrame[A, B]) Unwind(current Erased) (Erased, Frame) + type Throw struct + Err E + func (Throw[E]) OpResult() Resumed + func (o Throw[E]) DispatchError(ctx *ErrorContext[E]) (Resumed, bool) + type WriterContext struct + Output *[]W