Packages

object IO extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IO
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class AsyncEffect[E, A] extends IO[E, A]
  2. final class Ensuring[E, A] extends IO[E, A]
  3. final class Fail[E] extends IO[E, Nothing]
  4. final class FlatMap[E, A0, A] extends IO[E, A]
  5. final class Fork[E, A] extends IO[Nothing, Fiber[E, A]]
  6. final class Lock[E, A] extends IO[E, A]
  7. final class Point[A] extends IO[Nothing, A]
  8. final class Redeem[E, E2, A, B] extends IO[E2, B] with Function[A, IO[E2, B]]
  9. final class Strict[A] extends IO[Nothing, A]
  10. final class Supervise[E, A] extends IO[E, A]
  11. final class SyncEffect[A] extends IO[Nothing, A]
  12. final class Uninterruptible[E, A] extends IO[E, A]

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. final def absolve[E, A](v: IO[E, Either[E, A]]): IO[E, A]

    Submerges the error case of an Either into the IO.

    Submerges the error case of an Either into the IO. The inverse operation of IO.attempt.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. final def async[E, A](register: ((IO[E, A]) ⇒ Unit) ⇒ Unit): IO[E, A]

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. See async0 for the more expressive variant of this function that can return a value synchronously.

  7. final def async0[E, A](register: ((IO[E, A]) ⇒ Unit) ⇒ Async[E, A]): IO[E, A]

    Imports an asynchronous effect into a pure IO value, possibly returning the value synchronously.

  8. final def asyncInterrupt[E, A](register: ((IO[E, A]) ⇒ Unit) ⇒ Either[Canceler, IO[E, A]]): IO[E, A]

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. The effect has the option of returning the value synchronously, which is useful in cases where it cannot be determined if the effect is synchronous or asynchronous until the effect is actually executed. The effect also has the option of returning a canceler, which will be used by the runtime to cancel the asynchronous effect if the fiber executing the effect is interrupted.

  9. final def asyncM[E, A](register: ((IO[E, A]) ⇒ Unit) ⇒ IO[Nothing, _]): IO[E, A]

    Imports an asynchronous effect into a pure IO value.

    Imports an asynchronous effect into a pure IO value. This formulation is necessary when the effect is itself expressed in terms of IO.

  10. final def blocking[A](effect: ⇒ A): IO[Throwable, A]

    Imports a synchronous effect that does blocking IO into a pure value.

    Imports a synchronous effect that does blocking IO into a pure value.

    If the returned IO is interrupted, the blocked thread running the synchronous effect will be interrupted via Thread.interrupt.

  11. final def bracket[E, A, B](acquire: IO[E, A])(release: (A) ⇒ IO[Nothing, _])(use: (A) ⇒ IO[E, B]): IO[E, B]

    Acquires a resource, do some work with it, and then release that resource.

    Acquires a resource, do some work with it, and then release that resource. bracket will release the resource no matter the outcome of the computation, and will re-throw any exception that occurred in between.

  12. final def bracket0[E, A, B](acquire: IO[E, A])(release: (A, Exit[E, B]) ⇒ IO[Nothing, _])(use: (A) ⇒ IO[E, B]): IO[E, B]

    Acquires a resource, do some work with it, and then release that resource.

    Acquires a resource, do some work with it, and then release that resource. With bracket0 not only is the acquired resource be cleaned up, the outcome of the computation is also reified for processing.

  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  14. final def collectAll[E, A](in: Iterable[IO[E, A]]): IO[E, List[A]]

    Evaluate each effect in the structure from left to right, and collect the results.

    Evaluate each effect in the structure from left to right, and collect the results. For parallelism use collectAllPar.

  15. final def collectAllPar[E, A](as: Iterable[IO[E, A]]): IO[E, List[A]]

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. This is the parallel version of collectAll.

  16. final def collectAllParN[E, A](n: Long)(as: Iterable[IO[E, A]]): IO[E, List[A]]

    Evaluate each effect in the structure in parallel, and collect the results.

    Evaluate each effect in the structure in parallel, and collect the results. Only up to n tasks run in parallel. This is a version of collectAllPar, with a throttle.

  17. final def descriptor: IO[Nothing, Descriptor]

    Returns information about the current fiber, such as its fiber identity.

  18. final def die(t: Throwable): IO[Nothing, Nothing]

    Returns an IO that terminates with the specified Throwable.

  19. final def done[E, A](r: Exit[E, A]): IO[E, A]

    Creates an IO value from Exit

  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  22. final def fail[E](error: E): IO[E, Nothing]

    Creates an IO value that represents failure with the specified error.

    Creates an IO value that represents failure with the specified error. The moral equivalent of throw for pure code.

  23. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def flatten[E, A](io: IO[E, IO[E, A]]): IO[E, A]

    Flattens a nested action.

  25. final def foldLeft[E, S, A](in: Iterable[A])(zero: S)(f: (S, A) ⇒ IO[E, S]): IO[E, S]

    Folds an Iterable[A] using an effectful function f.

    Folds an Iterable[A] using an effectful function f. Works in sequence.

  26. final def foreach[E, A, B](in: Iterable[A])(fn: (A) ⇒ IO[E, B]): IO[E, List[B]]

    Apply the function fn to each element of the Iterable[A] and return the results in a new List[B].

    Apply the function fn to each element of the Iterable[A] and return the results in a new List[B]. For parallelism use foreachPar.

  27. final def foreachPar[E, A, B](as: Iterable[A])(fn: (A) ⇒ IO[E, B]): IO[E, List[B]]

    Evaluate the elements of an Iterable[A] in parallel and collect the results.

    Evaluate the elements of an Iterable[A] in parallel and collect the results. This is the parallel version of foreach.

  28. final def foreachParN[E, A, B](n: Long)(as: Iterable[A])(fn: (A) ⇒ IO[E, B]): IO[E, List[B]]

    Evaluate the elements of a traversable data structure in parallel and collect the results.

    Evaluate the elements of a traversable data structure in parallel and collect the results. Only up to n tasks run in parallel. This is a version of foreachPar, with a throttle.

  29. final def forkAll[E, A](as: Iterable[IO[E, A]]): IO[Nothing, Fiber[E, List[A]]]

    Forks all of the specified values, and returns a composite fiber that produces a list of their results, in order.

  30. final def forkAll_[E, A](as: Iterable[IO[E, A]]): IO[Nothing, Unit]

    Forks all of the specified values, and returns a composite fiber that produces a list of their results, in order.

  31. final def fromEither[E, A](v: Either[E, A]): IO[E, A]

    Lifts an Either into an IO.

  32. final def fromFiber[E, A](fiber: Fiber[E, A]): IO[E, A]

    Creates an IO value that represents the exit value of the specified fiber.

  33. final def fromFiberM[E, A](fiber: IO[E, Fiber[E, A]]): IO[E, A]

    Creates an IO value that represents the exit value of the specified fiber.

  34. final def fromOption[A](v: Option[A]): IO[Unit, A]

    Lifts an Option into an IO.

  35. final def fromTry[A](effect: ⇒ Try[A]): IO[Throwable, A]

    Imports a Try into an IO.

  36. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  37. final def halt[E](cause: Cause[E]): IO[E, Nothing]

    Returns an IO that fails with the specified Cause.

  38. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  39. final def interrupt: IO[Nothing, Nothing]

    Returns an IO that is interrupted.

  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. final def lock[E, A](executor: Executor)(io: IO[E, A]): IO[E, A]

    Locks the io to the specified executor.

  42. final def mergeAll[E, A, B](in: Iterable[IO[E, A]])(zero: B)(f: (B, A) ⇒ B): IO[E, B]

    Merges an Iterable[IO] to a single IO, works in parallel.

  43. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  44. final val never: IO[Nothing, Nothing]

    Returns a action that will never produce anything.

    Returns a action that will never produce anything. The moral equivalent of while(true) {}, only without the wasted CPU cycles.

  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  47. final def raceAll[E, A](io: IO[E, A], ios: Iterable[IO[E, A]]): IO[E, A]

    Races an IO[E, A] against elements of a Iterable[IO[E, A]].

    Races an IO[E, A] against elements of a Iterable[IO[E, A]]. Yields either the first success or the last failure.

  48. final def reduceAll[E, A](a: IO[E, A], as: Iterable[IO[E, A]])(f: (A, A) ⇒ A): IO[E, A]

    Reduces an Iterable[IO] to a single IO, works in parallel.

  49. final def require[E, A](error: E): (IO[E, Option[A]]) ⇒ IO[E, A]

    Requires that the given IO[E, Option[A]] contain a value.

    Requires that the given IO[E, Option[A]] contain a value. If there is no value, then the specified error will be raised.

  50. final def sleep(duration: Duration): IO[Nothing, Unit]

    Sleeps for the specified duration.

    Sleeps for the specified duration. This is always asynchronous.

  51. final def succeed[A](a: A): IO[Nothing, A]

    Lifts a strictly evaluated value into the IO monad.

  52. final def succeedLazy[A](a: ⇒ A): IO[Nothing, A]

    Lifts a non-strictly evaluated value into the IO monad.

    Lifts a non-strictly evaluated value into the IO monad. Do not use this function to capture effectful code. The result is undefined but may include duplicated effects.

  53. final def supervise[E, A](io: IO[E, A]): IO[E, A]

    Supervises the specified action, which ensures that any actions directly forked by the action are killed upon the action's own termination.

  54. final def superviseWith[E, A](io: IO[E, A])(supervisor: (Iterable[Fiber[_, _]]) ⇒ IO[Nothing, _]): IO[E, A]

    Supervises the specified action's spawned fibers.

  55. final def supervisor: IO[Nothing, (Cause[Nothing]) ⇒ IO[Nothing, _]]

    Retrieves the supervisor associated with the fiber running the action returned by this method.

  56. final def suspend[E, A](io: ⇒ IO[E, A]): IO[E, A]

    Lazily produces an IO value whose construction may have actional costs that should be deferred until evaluation.

    Lazily produces an IO value whose construction may have actional costs that should be deferred until evaluation.

    Do not use this method to effectfully construct IO values. The results will be undefined and most likely involve the physical explosion of your computer in a heap of rubble.

  57. final def sync[A](effect: ⇒ A): IO[Nothing, A]

    Imports a synchronous effect into a pure IO value.

    Imports a synchronous effect into a pure IO value.

    val nanoTime: IO[Nothing, Long] = IO.sync(System.nanoTime())
  58. final def sync0[A](effect: (Env) ⇒ A): IO[Nothing, A]

    Imports a synchronous effect into a pure IO value.

    Imports a synchronous effect into a pure IO value. This variant of sync lets you use the execution environment of the fiber.

    val nanoTime: IO[Nothing, Long] = IO.sync(System.nanoTime())
  59. final def syncCatch[E, A](effect: ⇒ A)(f: PartialFunction[Throwable, E]): IO[E, A]

    Safely imports an exception-throwing synchronous effect into a pure IO value, translating the specified throwables into E with the provided user-defined function.

  60. final def syncException[A](effect: ⇒ A): IO[Exception, A]

    Imports a synchronous effect into a pure IO value, translating any exceptions into an Exception failure in the returned value.

    Imports a synchronous effect into a pure IO value, translating any exceptions into an Exception failure in the returned value.

    def putStrLn(line: String): IO[Exception, Unit] = IO.syncException(println(line))
  61. final def syncExec[A](effect: (Executor) ⇒ A): IO[Nothing, A]

    Imports a synchronous effect into a pure IO value.

    Imports a synchronous effect into a pure IO value. This variant of sync lets you use the current executor of the fiber.

  62. final def syncThrowable[A](effect: ⇒ A): IO[Throwable, A]

    Imports a synchronous effect into a pure IO value, translating any throwables into a Throwable failure in the returned value.

    Imports a synchronous effect into a pure IO value, translating any throwables into a Throwable failure in the returned value.

    def putStrLn(line: String): IO[Throwable, Unit] = IO.syncThrowable(println(line))
  63. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. final val unit: IO[Nothing, Unit]

    Strictly-evaluated unit lifted into the IO monad.

  66. final def unsandbox[E, A](v: IO[Cause[E], A]): IO[E, A]

    The inverse operation IO.sandboxed

    The inverse operation IO.sandboxed

    Terminates with exceptions on the Left side of the Either error, if it exists. Otherwise extracts the contained IO[E, A]

  67. final def unyielding[E, A](io: IO[E, A]): IO[E, A]

    A combinator that allows you to identify long-running IO values to the runtime system for improved scheduling.

  68. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  71. final def when[E](b: Boolean)(io: IO[E, Unit]): IO[E, Unit]

    The moral equivalent of if (p) exp

  72. final def whenM[E](b: IO[Nothing, Boolean])(io: IO[E, Unit]): IO[E, Unit]

    The moral equivalent of if (p) exp when p has side-effects

  73. final def yieldNow: IO[Nothing, Unit]

    Yields to the runtime system, starting on a fresh stack.

  74. object Descriptor extends IO[Nothing, Descriptor]
  75. object Tags
  76. object Yield extends IO[Nothing, Unit]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped