Maven Central javadoc   🚧 WIP 🚧

Turbolift: Algebraic Effects for Scala 3


⭐ Expressive power

Turbolift supports constructs rarely found in other effect systems, or in new programming languages with native support for Algebraic Effects. See Advanced Features.

⭐ High performance

Excerpt from Effect Zoo microbenchmark results:



More results here.

⭐ Lightweight syntax

import turbolift.!!
import turbolift.effects.{Reader, State, Error}

case object MyReader extends Reader[Int]
case object MyState extends State[Int]
case object MyError extends Error[String]

val program =
    a <- MyState.get
    b <- MyReader.ask
    c <- {
      if b != 0
      then !!.pure(a / b)
      else MyError.raise(s"Tried to divide $a by zero")
    _ <- MyState.put(c)
  yield ()
// program: Computation[Unit, MyReader & MyError & MyState] = turbolift.Computation@24bc92eb

val result = program
// result: Either[String, Int] = Right(value = 33)


libraryDependencies += "io.github.marcinzh" %% "turbolift-core" % "0.74.0"


  • Turbolift’s syntax and typing of effects and handlers evolved from the predecessor project: Skutek (Eff monad).

  • The monad of delimited continuations is inspired by Scala Effekt.

  • IO related parts (WIP) are inspired by Cats Effect and ZIO.