Packages

trait App extends RTS

The entry point for a purely-functional application on the JVM.

import java.io.IOException
import scalaz.zio.{App, IO}
import scalaz.zio.console._

object MyApp extends App {

  def run(args: List[String]): IO[Nothing, ExitStatus] =
    myAppLogic.attempt.map(_.fold(_ => 1, _ => 0)).map(ExitStatus.ExitNow(_))

  def myAppLogic: IO[IOException, Unit] =
    for {
      _ <- putStrLn("Hello! What is your name?")
      n <- getStrLn
      _ <- putStrLn("Hello, " + n + ", good to meet you!")
    } yield ()
}
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. App
  2. RTS
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed abstract class ExitStatus extends Serializable with Product

Abstract Value Members

  1. abstract def run(args: List[String]): IO[Nothing, ExitStatus]

    The main function of the application, which will be passed the command-line arguments to the program and has to return an IO with the errors fully handled.

Concrete 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. val YieldMaxOpCount: Int

    Determines the maximum number of operations executed by a fiber before yielding to other fibers.

    Determines the maximum number of operations executed by a fiber before yielding to other fibers.

    FIXME: Replace this entirely with the new scheme.

    Definition Classes
    RTS
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def defaultHandler: (Cause[Any]) ⇒ IO[Nothing, Unit]

    The default handler for unhandled exceptions in the main fiber, and any fibers it forks that recursively inherit the handler.

    The default handler for unhandled exceptions in the main fiber, and any fibers it forks that recursively inherit the handler.

    Definition Classes
    RTS
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. lazy val executionContext: ExecutionContextExecutor

    The fiber's execution context.

    The fiber's execution context.

    Definition Classes
    RTS
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def main(args0: Array[String]): Unit

    The Scala main function, intended to be called only by the Scala runtime.

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def nonFatal(t: Throwable): Boolean

    Utility function to avoid catching truly fatal exceptions.

    Utility function to avoid catching truly fatal exceptions. Do not allocate memory here since this would defeat the point of checking for OOME.

    Attributes
    protected
    Definition Classes
    RTS
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def schedule[E, A](block: ⇒ A, duration: Duration): Async[E, Unit]
    Definition Classes
    RTS
  21. lazy val scheduledExecutor: ScheduledExecutorService

    The thread pool for scheduling timed tasks.

    The thread pool for scheduling timed tasks.

    Definition Classes
    RTS
  22. final def submit[A](block: ⇒ A): Unit
    Definition Classes
    RTS
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. val threadPool: ExecutorService

    The main thread pool used for executing fibers.

    The main thread pool used for executing fibers.

    Definition Classes
    RTS
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def unsafeRun[E, A](io: IO[E, A]): A

    Effectfully and synchronously interprets an IO[E, A], either throwing an error, running forever, or producing an A.

    Effectfully and synchronously interprets an IO[E, A], either throwing an error, running forever, or producing an A.

    Definition Classes
    RTS
  27. final def unsafeRunAsync[E, A](io: IO[E, A])(k: Callback[E, A]): Unit
    Definition Classes
    RTS
  28. final def unsafeRunSync[E, A](io: IO[E, A]): ExitResult[E, A]

    Effectfully interprets an IO, blocking if necessary to obtain the result.

    Effectfully interprets an IO, blocking if necessary to obtain the result.

    Definition Classes
    RTS
  29. final def unsafeShutdownAndWait(timeout: Duration): Unit
    Definition Classes
    RTS
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  33. object ExitStatus extends Serializable

Inherited from RTS

Inherited from AnyRef

Inherited from Any

Ungrouped