Packages

trait App extends DefaultRuntime

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

import scalaz.zio.App
import scalaz.zio.console._

object MyApp extends App {

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

  def myAppLogic =
    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. DefaultRuntime
  3. Runtime
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Environment = Clock with Console with System with Random with Blocking

    The environment of the runtime.

    The environment of the runtime.

    Definition Classes
    DefaultRuntime

Abstract Value Members

  1. abstract def run(args: List[String]): ZIO[Environment, Nothing, Int]

    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 Environment: Environment

    The environment of the runtime.

    The environment of the runtime.

    Definition Classes
    DefaultRuntimeRuntime
  5. val Platform: Platform

    The platform of the runtime, which provides the essential capabilities necessary to bootstrap execution of tasks.

    The platform of the runtime, which provides the essential capabilities necessary to bootstrap execution of tasks.

    Definition Classes
    DefaultRuntimeRuntime
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def main(args0: Array[String]): Unit

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

  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def unsafeRun[E, A](zio: ZIO[Clock with Console with System with Random with Blocking, E, A]): A

    Executes the effect synchronously, failing with scalaz.zio.FiberFailure if there are any errors.

    Executes the effect synchronously, failing with scalaz.zio.FiberFailure if there are any errors. May fail on Scala.js if the effect cannot be entirely run synchronously.

    This method is effectful and should only be done at the edges of your program.

    Definition Classes
    Runtime
  21. final def unsafeRunAsync[E, A](zio: ZIO[Clock with Console with System with Random with Blocking, E, A])(k: (Exit[E, A]) ⇒ Unit): Unit

    Executes the effect asynchronously, eventually passing the exit value to the specified callback.

    Executes the effect asynchronously, eventually passing the exit value to the specified callback.

    This method is effectful and should only be invoked at the edges of your program.

    Definition Classes
    Runtime
  22. final def unsafeRunAsync_[E, A](zio: ZIO[Clock with Console with System with Random with Blocking, E, A]): Unit

    Executes the effect asynchronously, discarding the result of execution.

    Executes the effect asynchronously, discarding the result of execution.

    This method is effectful and should only be invoked at the edges of your program.

    Definition Classes
    Runtime
  23. final def unsafeRunSync[E, A](zio: ZIO[Clock with Console with System with Random with Blocking, E, A]): Exit[E, A]

    Executes the effect synchronously.

    Executes the effect synchronously. May fail on Scala.js if the effect cannot be entirely run synchronously.

    This method is effectful and should only be invoked at the edges of your program.

    Definition Classes
    Runtime
  24. final def unsafeRunToFuture[E <: Throwable, A](io: IO[E, A]): Future[A]

    Runs the IO, returning a Future that will be completed when the effect has been executed.

    Runs the IO, returning a Future that will be completed when the effect has been executed.

    This method is effectful and should only be used at the edges of your program.

    Definition Classes
    Runtime
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from DefaultRuntime

Inherited from Runtime[Clock with Console with System with Random with Blocking]

Inherited from AnyRef

Inherited from Any

Ungrouped