Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.
/ smelly-ops Public archive

Cats & ZIO ops made implicitly / convert cats.effect.IO to zio.ZIO / convert zio.ZIO to cats.effect.IO

License

Notifications You must be signed in to change notification settings

Jacke/smelly-ops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smelly-ops

Cats & ZIO ops made implicitly

Add toZIO[Env] and toCatsEffect to cats.effect.IO/zio.ZIO instances where Env could be ZEnv, Any, ...

  implicit val R: zio.Runtime[zio.ZEnv] = zio.Runtime.default
  val CIOE: cats.effect.IO[Int] = cats.effect.IO(1*100)

  import SmellyOps._
  // convert IO to ZIO[Zenv] to IO to ZIO[Any] to IO and run in
  CIOE.toZIO[ZEnv].toCatsEffect.toZIO[Any].toCatsEffect.unsafeRunSync shouldBe 100

Install

    libraryDependencies ++= Seq(
      "com.github.jacke" %% "smelly" %  "0.0.10",
    )

About

Cats & ZIO ops made implicitly / convert cats.effect.IO to zio.ZIO / convert zio.ZIO to cats.effect.IO

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages