cps.monads.catsEffect.CatsIO.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cps-async-connect-cats-effect_3 Show documentation
Show all versions of cps-async-connect-cats-effect_3 Show documentation
cps-async-connect: integration of dotty-cps-async with effect stacks
The newest version!
package cps.monads.catsEffect
/*
* (C) Ruslan Shevchenko
* 2021
*/
import cats.effect._
import cps._
import scala.util._
import scala.concurrent._
/**
* CpsAsyncMonad for cats-effect.
**/
class CatsIOCpsAsyncMonad extends CatsConcurrent[IO]:
type F[T] = IO[T]
given catsIO: CatsIOCpsAsyncMonad = CatsIOCpsAsyncMonad()
given ioToFutureConversion(using runtime: unsafe.IORuntime): CpsMonadConversion[IO,Future] with
def apply[T](io:IO[T]): Future[T] =
io.unsafeToFuture()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy