All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cps.monads.catsEffect.CatsIO.scala Maven / Gradle / Ivy

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