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]]) extends HaltEmitOrAwait[F, O] with EmitOrAwait[F, O] with Product with Serializable

    The Await constructor instructs the driver to evaluate req.

  3. implicit final class ChannelSyntax[F[_], I, O] extends AnyVal

    Adds syntax for Channel.

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

    Continuation of the process.

  5. 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.

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

    Marker trait representing process in Emit or Await state.

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

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

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

  9. 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.

  10. 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

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

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

  12. implicit final class Process0Syntax[O] extends AnyVal

    This class provides infix syntax specific to Process0.

  13. implicit final class Process1Syntax[I, O] extends AnyVal

    This class provides infix syntax specific to Process1.

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

  15. implicit final class SinkSyntax[F[_], I] extends AnyVal

    Adds syntax for Sink.

  16. implicit final class SinkTaskSyntax[I] extends AnyVal

    Syntax for Sink, that is specialized for Task

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

    Syntax for processes that have its effects wrapped in Task

  18. 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.

  19. implicit final class TeeSyntax[I, I2, O] extends AnyVal

    This class provides infix syntax specific to Tee.

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

  21. implicit final class WriterSyntax[F[_], W, O] extends AnyVal

    Infix syntax for working with Writer[F,W,O].

  22. implicit final class WriterTaskSyntax[W, O] extends AnyVal

  23. implicit final class WyeSyntax[I, I2, O] extends AnyVal

    This class provides infix syntax specific to Wye.

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 clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. 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

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

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

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

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

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

    A Writer which emits one value to the output.

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

    A Writer which writes the given value.

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

    Alias for halt.

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

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

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

    Evaluate an arbitrary effect in a Process.

    Evaluate an arbitrary effect in a Process. The resulting Process emits a single value. To evaluate repeatedly, use repeatEval(t). Do not use eval.repeat or repeat(eval) as that may cause infinite loop in certain situations.

  36. 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.

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

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

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

    A Process which emits n repetitions of a.

  39. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  40. 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.

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

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

    The Process which emits no values and signals normal termination.

  43. def hashCode(): Int

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

    Definition Classes
    Any
  45. 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.

  46. 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.

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

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

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

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

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

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

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

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

    Definition Classes
    ProcessInstances
  55. 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).

  56. 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

  57. 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.

  58. 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.

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

    Prefix syntax for p.repeat.

  60. def repeatEval[F[_], O](f: 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 evaluation of f signals termination with End or an error occurs.

    Note that if f results to failure of type Terminated the repeatEval will convert cause to respective process cause termination, and will halt with that cause.

  61. 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.

  62. 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.

  63. 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
  64. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

  66. def toString(): String

    Definition Classes
    AnyRef → Any
  67. def unfold[S, A](s0: S)(f: (S) ⇒ Option[(A, S)]): Process0[A]

    Produce a (potentially infinite) source from an unfold.

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

    Like unfold, but takes an effectful function.

  69. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ProcessInstances

Inherited from AnyRef

Inherited from Any

Ungrouped