An effect that returns a tuple of a resource and an effect to release it.
An effect that returns a tuple of a resource and an effect to release it.
Streaming types might implement a bracket operation that keeps the resource open through multiple outputs of a stream.
Allocates a resource and supplies it to the given function.
Allocates a resource and supplies it to the given function. The
resource is released as soon as the resulting F[B]
is
completed, whether normally or as a raised error.
the function to apply to the allocated resource
the result of applying [F] to
Effectfully allocates and releases a resource. Forms a
MonadError
on the resource type when the effect type has a Bracket instance. Nested resources are released in reverse order of acquisition. Outer resources are released even if an inner use or release fails.The above prints:
the effect type in which the resource is allocated and released
the type of resource