scalaz.stream

Process

object Process extends ProcessInstances

Source
Process.scala
Linear Supertypes
ProcessInstances, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Process
  2. ProcessInstances
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Append[+F[_], +O](head: HaltEmitOrAwait[F, O], stack: Vector[(Cause) ⇒ Trampoline[Process[F, O]]]) extends Process[F, O] with Product with Serializable

    The Append constructor instructs the driver to continue with evaluation of first step found in tail Vector.

  2. case class Await[+F[_], A, +O](req: F[A], rcv: (\/[EarlyCause, A]) ⇒ Trampoline[Process[F, O]], preempt: (A) ⇒ Trampoline[Process[F, Nothing]] = ...) extends HaltEmitOrAwait[F, O] with EmitOrAwait[F, O] with Product with Serializable

    The Await constructor instructs the driver to evaluate req.

  3. case class Cont[+F[_], +O](stack: Vector[(Cause) ⇒ Trampoline[Process[F, O]]]) extends Product with Serializable

    Continuation of the process.

  4. case class Emit[+O](seq: Seq[O]) extends HaltEmitOrAwait[Nothing, O] with EmitOrAwait[Nothing, O] with Product with Serializable

    The Emit constructor instructs the driver to emit the given sequence of values to the output and then halt execution with supplied reason.

  5. sealed trait EmitOrAwait[+F[_], +O] extends Process[F, O]

    Marker trait representing process in Emit or Await state.

  6. case class Env[-I, -I2]() extends Product with Serializable

  7. implicit final class EvalProcess[F[_], O] extends AnyVal

    Provides infix syntax for eval: Process[F,F[O]] => Process[F,O]

  8. case class Halt(cause: Cause) extends HaltEmitOrAwait[Nothing, Nothing] with HaltOrStep[Nothing, Nothing] with Product with Serializable

    The Halt constructor instructs the driver that the last evaluation of Process completed with supplied cause.

  9. sealed trait HaltEmitOrAwait[+F[_], +O] extends Process[F, O]

    Tags a state of process that has no appended tail, tha means can be Halt, Emit or Await

  10. sealed trait HaltOrStep[+F[_], +O] extends AnyRef

    Marker trait representing next step of process or terminated process in Halt

  11. implicit final class Process0Syntax[O] extends AnyVal

    This class provides infix syntax specific to Process0.

  12. implicit final class ProcessSyntax[F[_], O] extends AnyVal

  13. implicit class SourceSyntax[O] extends WyeOps[O]

    Syntax for processes that have its effects wrapped in Task

  14. case class Step[+F[_], +O](head: EmitOrAwait[F, O], next: Cont[F, O]) extends HaltOrStep[F, O] with Product with Serializable

    Intermediate step of process.

  15. type Trampoline[+A] = Free[Function0, A]

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def Both[I, I2]: Y[ReceiveY[I, I2]]

  7. object Cont extends Serializable

  8. def Get[I]: Is[I]

  9. object HaltEmitOrAwait

  10. def L[I]: Is[I]

  11. def R[I2]: T[I2]

  12. val Trampoline: scalaz.Trampoline.type

  13. def apply[O](o: O*): Process0[O]

    Alias for emitAll

  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. def await[F[_], A, O](req: F[A])(rcv: (A) ⇒ Process[F, O]): Process[F, O]

    Await the given F request and use its result.

    Await the given F request and use its result. If you need to specify fallback, use awaitOr

  16. def await1[I]: Process1[I, I]

    The Process1 which awaits a single input, emits it, then halts normally.

  17. def await1Or[I](fb: ⇒ Process1[I, I]): Process1[I, I]

    Like await1, but consults fb when await fails to receive an I

  18. def await1W[A]: Writer1[Nothing, A, A]

    Writer based version of await1.

  19. def awaitBoth[I, I2]: Wye[I, I2, ReceiveY[I, I2]]

    The Wye which request from both branches concurrently.

  20. def awaitBothW[I, I2]: WyeW[Nothing, I, I2, ReceiveY[I, I2]]

    Writer based version of awaitBoth.

  21. def awaitL[I]: Tee[I, Any, I]

    The Tee which requests from the left branch, emits this value, then halts.

  22. def awaitLW[I]: TeeW[Nothing, I, Any, I]

    Writer based version of awaitL.

  23. def awaitOr[F[_], A, O](req: F[A])(fb: (EarlyCause) ⇒ Process[F, O])(rcv: (A) ⇒ Process[F, O]): Process[F, O]

    Await a request, and if it fails, use fb to determine the next state.

    Await a request, and if it fails, use fb to determine the next state. Otherwise, use rcv to determine the next state.

  24. def awaitR[I2]: Tee[Any, I2, I2]

    The Tee which requests from the right branch, emits this value, then halts.

  25. def awaitRW[I2]: TeeW[Nothing, Any, I2, I2]

    Writer based version of awaitR.

  26. def bracket[F[_], A, O](req: F[A])(release: (A) ⇒ Process[F, Nothing])(rcv: (A) ⇒ Process[F, O]): Process[F, O]

    Resource and preemption safe await constructor.

    Resource and preemption safe await constructor.

    Use this combinator, when acquiring resources. This build a process that when run evaluates req, and then runs rcv. Once rcv is completed, fails, or is interrupted, it will run release

    When the acquisition (req) is interrupted, neither release or rcv is run, however when the req was interrupted after resource in req was acquired then, the release is run.

    If,the acquisition fails, use bracket(req)(onPreempt)(rcv).onFailure(err => ???) code to recover from the failure eventually.

  27. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def constant[A](a: A, chunkSize: Int = 1): Process0[A]

    The infinite Process, always emits a.

    The infinite Process, always emits a. If for performance reasons it is good to emit a in chunks, specify size of chunk by chunkSize parameter

  29. def emit[O](o: O): Process0[O]

    The Process which emits the single value given, then halts.

  30. def emitAll[O](os: Seq[O]): Process0[O]

    The Process which emits the given sequence of values, then halts.

  31. def emitO[O](o: O): Process0[\/[Nothing, O]]

    A Writer which emits one value to the output.

  32. def emitW[W](s: W): Process0[\/[W, Nothing]]

    A Writer which writes the given value.

  33. def empty[F[_], O]: Process[F, O]

    Alias for halt.

  34. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  35. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  36. def eval[F[_], O](fo: F[O]): Process[F, O]

    Alias for await(fo)(emit)

  37. def eval_[F[_], O](f: F[O]): Process[F, Nothing]

    Evaluate an arbitrary effect once, purely for its effects, ignoring its return value.

    Evaluate an arbitrary effect once, purely for its effects, ignoring its return value. This Process emits no values.

  38. def fail(rsn: Throwable): Process0[Nothing]

    The Process which emits no values and halts immediately with the given exception.

  39. def fill[A](n: Int)(a: A, chunkSize: Int = 1): Process0[A]

    A Process which emits n repetitions of a.

  40. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  41. def forwardFill[A](p: Process[Task, A])(implicit S: Strategy): Process[Task, A]

    Produce a continuous stream from a discrete stream by using the most recent value.

  42. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  43. val halt: Process0[Nothing]

    The Process which emits no values and signals normal termination.

  44. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  45. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  46. def iterate[A](start: A)(f: (A) ⇒ A): Process0[A]

    An infinite Process that repeatedly applies a given function to a start value.

    An infinite Process that repeatedly applies a given function to a start value. start is the first value emitted, followed by f(start), then f(f(start)), and so on.

  47. def iterateEval[F[_], A](start: A)(f: (A) ⇒ F[A]): Process[F, A]

    Like iterate, but takes an effectful function for producing the next state.

    Like iterate, but takes an effectful function for producing the next state. start is the first value emitted.

  48. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  49. final def notify(): Unit

    Definition Classes
    AnyRef
  50. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  51. implicit val process1Choice: Choice[Process1]

    Definition Classes
    ProcessInstances
  52. implicit def process1Contravariant[O]: Contravariant[[α]Process[Is, O]]

    Definition Classes
    ProcessInstances
  53. implicit val process1Profunctor: Profunctor[Process1]

    Definition Classes
    ProcessInstances
  54. implicit val processHoist: Hoist[Process]

    Definition Classes
    ProcessInstances
  55. implicit def processMonadPlus[F[_]]: MonadPlus[[α]Process[F, α]]

    Definition Classes
    ProcessInstances
  56. def range(start: Int, stopExclusive: Int, by: Int = 1): Process0[Int]

    Lazily produce the range [start, stopExclusive).

    Lazily produce the range [start, stopExclusive). If you want to produce the sequence in one chunk, instead of lazily, use emitAll(start until stopExclusive).

  57. def ranges(start: Int, stopExclusive: Int, size: Int): Process0[(Int, Int)]

    Lazily produce a sequence of nonoverlapping ranges, where each range contains size integers, assuming the upper bound is exclusive.

    Lazily produce a sequence of nonoverlapping ranges, where each range contains size integers, assuming the upper bound is exclusive. Example: ranges(0, 1000, 10) results in the pairs (0, 10), (10, 20), (20, 30) ... (990, 1000)

    Note: The last emitted range may be truncated at stopExclusive. For instance, ranges(0,5,4) results in (0,4), (4,5).

    Exceptions thrown
    IllegalArgumentException

    if size <= 0

  58. def receive1[I, O](rcv: (I) ⇒ Process1[I, O]): Process1[I, O]

    The Process1 which awaits a single input and passes it to rcv to determine the next state.

  59. def receive1Or[I, O](fb: ⇒ Process1[I, O])(rcv: (I) ⇒ Process1[I, O]): Process1[I, O]

    Like receive1, but consults fb when it fails to receive an input.

  60. def repeat[F[_], O](p: Process[F, O]): Process[F, O]

    Prefix syntax for p.repeat.

  61. def repeatEval[F[_], O](fo: F[O]): Process[F, O]

    Evaluate an arbitrary effect in a Process.

    Evaluate an arbitrary effect in a Process. The resulting Process will emit values until an error occurs.

  62. def sleepUntil[F[_], A](awaken: Process[F, Boolean])(p: Process[F, A]): Process[F, A]

    Delay running p until awaken becomes true for the first time.

    Delay running p until awaken becomes true for the first time. The awaken process may be discrete.

  63. def supply(initial: Long): Process[Task, Long]

    A supply of Long values, starting with initial.

    A supply of Long values, starting with initial. Each read is guaranteed to return a value which is unique across all threads reading from this supply.

  64. def suspend[F[_], O](p: ⇒ Process[F, O]): Process[F, O]

    Produce p lazily.

    Produce p lazily. Useful if producing the process involves allocation of some local mutable resource we want to ensure is freshly allocated for each consumer of p.

    Note that this implementation assures that:

    suspend(p).kill === suspend(p.kill)
    suspend(p).kill === p.kill
    
    suspend(p).repeat === suspend(p.repeat)
    suspend(p).repeat ===  p.repeat
    
    suspend(p).eval === suspend(p.eval)
    suspend(p).eval === p.eval
    
    Halt(cause) ++ suspend(p) === Halt(cause) ++ p
  65. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  66. def tell[S](s: S): Process0[\/[S, Nothing]]

    A Writer which writes the given value; alias for emitW.

  67. implicit def toChannelSyntax[F[_], I, O](self: Channel[F, I, O]): ChannelSyntax[F, I, O]

    Adds syntax for Channel.

  68. implicit def toProcess1Syntax[I, O](self: Process1[I, O]): Process1Syntax[I, O]

    Adds syntax for Process1.

  69. implicit def toSinkSyntax[F[_], I](self: Sink[F, I]): SinkSyntax[F, I]

    Adds syntax for Sink.

  70. implicit def toSinkTaskSyntax[F[_], I](self: Sink[Task, I]): SinkTaskSyntax[I]

    Adds syntax for Sink that is specialized for Task.

  71. def toString(): String

    Definition Classes
    AnyRef → Any
  72. implicit def toTeeSyntax[I, I2, O](self: Tee[I, I2, O]): TeeSyntax[I, I2, O]

    Adds syntax for Tee.

  73. implicit def toWriterSyntax[F[_], W, O](self: Writer[F, W, O]): WriterSyntax[F, W, O]

    Adds syntax for Writer.

  74. implicit def toWriterTaskSyntax[W, O](self: Writer[Task, W, O]): WriterTaskSyntax[W, O]

    Adds syntax for Writer that is specialized for Task.

  75. implicit def toWyeSyntax[I, I2, O](self: Wye[I, I2, O]): WyeSyntax[I, I2, O]

    Adds syntax for Wye.

  76. def unfold[S, A](s0: S)(f: (S) ⇒ Option[(A, S)]): Process0[A]

    Produce a (potentially infinite) source from an unfold.

  77. def unfoldEval[F[_], S, A](s0: S)(f: (S) ⇒ F[Option[(A, S)]]): Process[F, A]

    Like unfold, but takes an effectful function.

  78. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  79. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  80. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ProcessInstances

Inherited from AnyRef

Inherited from Any

Ungrouped