As of Arrow 0.9.0 we have deprecated support for Deferred from kotlinx.coroutines. Using Deferred as a return type is considered a smell by the library owners, and we were not able to make it work consistently against some of the Laws.

But, we have not given up support for suspend functions! If you would like to use suspend fun you can do so using arrow-fx:

import arrow.effects.IO
import arrow.unsafe
suspend fun sayHello(): Unit =
  println("Hello World")
suspend fun sayGoodBye(): Unit =
  println("Good bye World!")
fun greet(): IO<Unit> =
  fx {
    !effect { sayHello() }
    !effect { sayGoodBye() }
fun main() { // The edge of our world
  unsafe { runBlocking { greet() } }