Packages

sealed abstract class Pull[+F[_], +O, +R] extends AnyRef

A p: Pull[F,O,R] reads values from one or more streams, returns a result of type R, and produces a Stream[F,O] when calling p.stream.

Any resources acquired by p are freed following the call to stream.

Laws:

Pull forms a monad in R with pure and flatMap:

  • pure >=> f == f
  • f >=> pure == f
  • (f >=> g) >=> h == f >=> (g >=> h) where f >=> g is defined as a => a flatMap f flatMap g

raiseError is caught by handleErrorWith:

  • handleErrorWith(raiseError(e))(f) == f(e)
Source
Pull.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Pull
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def >>[F2[x] >: F[x], O2 >: O, R2](p2: ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Alias for flatMap(_ => p2).

  5. def as[R2](r2: R2): Pull[F, O, R2]

    Alias for _.map(_ => o2).

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def attempt: Pull[F, O, Either[Throwable, R]]

    Returns a pull with the result wrapped in Right, or an error wrapped in Left if the pull has failed.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  9. def covary[F2[x] >: F[x]]: Pull[F2, O, R]

    Lifts this pull to the specified effect type.

  10. def covaryAll[F2[x] >: F[x], O2 >: O, R2 >: R]: Pull[F2, O2, R2]

    Lifts this pull to the specified effect type, output type, and resource type.

  11. def covaryOutput[O2 >: O]: Pull[F, O2, R]

    Lifts this pull to the specified output type.

  12. def covaryResource[R2 >: R]: Pull[F, O, R2]

    Lifts this pull to the specified resource type.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def flatMap[F2[x] >: F[x], O2 >: O, R2](f: (R) ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Applies the resource of this pull to f and returns the result.

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def handleErrorWith[F2[x] >: F[x], O2 >: O, R2 >: R](h: (Throwable) ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    If this terminates with Pull.raiseError(e), invoke h(e).

  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def map[R2](f: (R) ⇒ R2): Pull[F, O, R2]

    Applies the resource of this pull to f and returns the result in a new Pull.

  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def onComplete[F2[x] >: F[x], O2 >: O, R2 >: R](p2: ⇒ Pull[F2, O2, R2]): Pull[F2, O2, R2]

    Run p2 after this, regardless of errors during this, then reraise any errors encountered during this.

  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. def void: Pull[F, O, Unit]

    Discards the result type of this pull.

  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped