From 2fc21262e21e510ac3a81a440184913b62e94317 Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Sun, 30 Jan 2022 13:29:09 -0800 Subject: [PATCH] upgrade zio version (#862) --- build.sbt | 2 +- core/shared/src/main/scala/zio/prelude/fx/ZPure.scala | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index ff47abea1..c67278e43 100644 --- a/build.sbt +++ b/build.sbt @@ -35,7 +35,7 @@ addCommandAlias( ";lawsNative/test;experimentalLawsNative/test" // `test` currently executes only compilation, see `nativeSettings` in `BuildHelper` ) -val zioVersion = "2.0.0-RC1" +val zioVersion = "2.0.0-RC2" lazy val root = project .in(file(".")) diff --git a/core/shared/src/main/scala/zio/prelude/fx/ZPure.scala b/core/shared/src/main/scala/zio/prelude/fx/ZPure.scala index 46a311ce3..ec90e5c53 100644 --- a/core/shared/src/main/scala/zio/prelude/fx/ZPure.scala +++ b/core/shared/src/main/scala/zio/prelude/fx/ZPure.scala @@ -19,7 +19,7 @@ package zio.prelude.fx import com.github.ghik.silencer.silent import zio.internal.{Stack, StackBool} import zio.prelude._ -import zio.{CanFail, Chunk, ChunkBuilder, IsNotIntersection, NeedsEnv, NonEmptyChunk, Tag, ZEnvironment, ZIO} +import zio.{CanFail, Chunk, ChunkBuilder, NeedsEnv, NonEmptyChunk, Tag, ZEnvironment, ZIO} import scala.annotation.{implicitNotFound, switch} import scala.reflect.ClassTag @@ -1064,7 +1064,7 @@ object ZPure extends ZPureLowPriorityImplicits with ZPureArities { /** * Accesses the specified service in the environment of the computation. */ - def service[S, R: Tag: IsNotIntersection]: ZPure[Nothing, S, S, R, Nothing, R] = + def service[S, R: Tag]: ZPure[Nothing, S, S, R, Nothing, R] = serviceWith(identity) /** @@ -1143,14 +1143,14 @@ object ZPure extends ZPureLowPriorityImplicits with ZPureArities { } final class ServiceWithPartiallyApplied[R](private val dummy: Boolean = true) extends AnyVal { - def apply[S, A](f: R => A)(implicit ev: IsNotIntersection[R], tag: Tag[R]): ZPure[Nothing, S, S, R, Nothing, A] = + def apply[S, A](f: R => A)(implicit tag: Tag[R]): ZPure[Nothing, S, S, R, Nothing, A] = serviceWithPure(r => ZPure.succeed(f(r))) } final class ServiceWithPurePartiallyApplied[R](private val dummy: Boolean = true) extends AnyVal { def apply[W, S1, S2, E, A]( f: R => ZPure[W, S1, S2, Any, E, A] - )(implicit ev: IsNotIntersection[R], tag: Tag[R]): ZPure[W, S1, S2, R, E, A] = + )(implicit tag: Tag[R]): ZPure[W, S1, S2, R, E, A] = environmentWithPure(env => f(env.get)) }