Acquire a resource within a Pull
.
Acquire a resource within a Pull
. The cleanup action will be run at the end
of the .close
scope which executes the returned Pull
. The acquired
resource is returned as the result value of the pull.
Like acquire but the result value is a tuple consisting of a cancellation pull and the acquired resource.
Like acquire but the result value is a tuple consisting of a cancellation pull and the acquired resource. Running the cancellation pull frees the resource. This allows the acquired resource to be released earlier than at the end of the containing pull scope.
Creates a pull that when interpreted, evalutes the specified effectful value and returns the result as the resource of the pull.
Creates a pull that when interpreted, evalutes the specified effectful value and returns
the result as the resource of the pull. If evaluating the effect results in an exception,
the exception is returned as a Left
. Otherwise, the result is returned as a Right
.
Converts a pure pull to an effectful pull of the specified type.
The completed Pull
.
The completed Pull
. Reads and outputs nothing.
Creates a pull that when interpreted, evalutes the specified effectful value and returns the result as the resource of the pull.
Creates a pull that when interpreted, evalutes the specified effectful value and returns the result as the resource of the pull. If evaluating the effect results in an exception, the exception fails the pull (via fail).
Lifts a scope in to a pull.
The Pull
that reads and outputs nothing, and fails with the given error.
Repeatedly use the output of the Pull
as input for the next step of the pull.
Repeatedly use the output of the Pull
as input for the next step of the pull.
Halts when a step terminates with Pull.done
or Pull.fail
.
If p
terminates with fail(e)
, invoke handle(e)
.
Write a Chunk[W]
to the output of this Pull
.
Write a single W
to the output of this Pull
.
Write a stream to the output of this Pull
.
The Pull
that reads and outputs nothing, and succeeds with the given value, R
.
Returns a pull that lazily evaluates p
.