Pull
- Companion
- class
trait PullLowPriority
class Object
trait Matchable
class Any
Type members
Classlikes
Value members
Methods
Like eval but if the effectful value fails, the exception is returned in a
instead of failing the pull.
Leftinstead of failing the pull.
def extendScopeTo[F <: ([_$6] =>> Any), O](s: Stream[F, O])(F: MonadError[F, Throwable]): Pull[F, INothing, Stream[F, O]]
Extends the scope of the currently open resources to the specified stream, preventing them
from being finalized until after
to a stream, compiled, and evaluated before
from being finalized until after
s completes execution, even if the returned pull is convertedto a stream, compiled, and evaluated before
s is compiled and evaluated.Repeatedly uses the output of the pull as input for the next step of the pull.
Halts when a step terminates with
Halts when a step terminates with
None or Pull.raiseError. def raiseError[F <: ([_$11] =>> Any)](err: Throwable)(evidence$1: RaiseThrowable[F]): Pull[F, INothing, INothing]
Reads and outputs nothing, and fails with the given error.
The
F type must be explicitly provided (e.g., via raiseError[IO] or raiseError[Fallible]).Lifts an Either[Throwable, A]
to an effectful Pull[F, A, Unit]
.
- Example
- {{{
scala> import cats.effect.IO, scala.util.Try
scala> Pull.fromEitherIO.stream.compile.toList.unsafeRunSync()
res0: List[Int] = List(42)
scala> Try(Pull.fromEither[IO] (Left(new RuntimeException)).stream.compile.toList.unsafeRunSync())
res1: Try[List[INothing] ] = Failure(java.lang.RuntimeException)
}}}
Implicits
Implicits
implicit def syncInstance[F <: ([_$14] =>> Any), O](ev: ApplicativeError[F, Throwable]): Sync[[_$15] =>> Pull[F, O, _$15]]
Sync instance for Pull.