Skuld.Comp.Types (skuld v0.1.26)
View SourceType definitions for Skuld.Comp.
These types define the core abstractions of the evidence-passing effect system.
Summary
Types
A computation awaiting execution
The environment carrying evidence, state, and leave-scope
A handler interprets effect operations
Continuation after an effect
Leave-scope handler - cleans up or redirects
Any result value - opaque to the framework
Effect signature - identifies which handler handles an operation. Can be a simple atom or a tuple for tagged effects.
Transform-suspend handler - decorates ExternalSuspend values when yielding
Types
A computation awaiting execution
@type env() :: Skuld.Comp.Env.t()
The environment carrying evidence, state, and leave-scope
A handler interprets effect operations
Continuation after an effect
Leave-scope handler - cleans up or redirects
@type result() :: term()
Any result value - opaque to the framework
Effect signature - identifies which handler handles an operation. Can be a simple atom or a tuple for tagged effects.
@type transform_suspend() :: (Skuld.Comp.ExternalSuspend.t(), env() -> {Skuld.Comp.ExternalSuspend.t(), env()})
Transform-suspend handler - decorates ExternalSuspend values when yielding