Skip to content

Commit

Permalink
update versions
Browse files Browse the repository at this point in the history
  • Loading branch information
kitlangton committed Oct 16, 2022
1 parent fa465ef commit 0af3a41
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 51 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ val sharedSettings = Seq(
}
)

val zio1Version = "1.0.13"
val zio2Version = "2.0.0-RC6"
val zioQueryVersion = "0.3.0-RC2"
val zio1Version = "1.0.17"
val zio2Version = "2.0.2"
val zioQueryVersion = "0.3.1"
val catsEffect3Version = "3.3.5"

lazy val root = (project in file("."))
Expand Down
4 changes: 2 additions & 2 deletions core/shared/src/test/scala/parallelfor/ParallelSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package parallelfor

import parallelfor.FreeParallel.{effect, parallelizable}
import parallelfor.ParTrace.zipped
import zio.test.{Trace => _, _}
import zio.test._

object ParallelSpec extends DefaultRunnableSpec {
object ParallelSpec extends ZIOSpecDefault {
def spec =
suite("ParallelFor")(
test("map only") {
Expand Down
31 changes: 0 additions & 31 deletions core/shared/src/test/scala/parallelfor/ParallelizationDebug.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,6 @@ object ParallelizationDebug extends ZIOAppDefault {
val run =
program.timed.debug("RESULT")

val nice = ZIO
.ZIOWithFilterOps(stringZIO)
.withFilter(
(
(check$ifrefutable$1: String) =>
(check$ifrefutable$1: String @unchecked) match {
case s"lo and$word" => true
case _ => false
}
)
)
.flatMap(
(
(x$1: String) =>
(x$1: String @unchecked) match {
case s"lo and $word" =>
intZIO.map[String](((int: Int) => word.+(int)))
}
)
)

ZIO
.ZIOWithFilterOps[zio.Clock, NoSuchElementException, String](stringZIO)
.withFilter {
case s"cool$string" => true
case _ => false
}
.map[String] { case s"cool$string" =>
string
}

def delayedEffect[A](name: String)(a: => A) =
ZIO.debug(s"STARTING $name") *>
ZIO.sleep(2.seconds).as(a).debug(s"COMPLETED $name with result")
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.7.0
sbt.version = 1.7.2
15 changes: 1 addition & 14 deletions zio/shared/src/main/scala/parallelfor/interop/zio/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import _root_.zio._
import parallelfor.Parallelizable

package object zio {

implicit val zioPar: Parallelizable[ZIO] =
new Parallelizable[ZIO] {
override def zipPar[R, E, A, B](left: ZIO[R, E, A], right: ZIO[R, E, B]): ZIO[R, E, (A, B)] =
Expand All @@ -16,18 +17,4 @@ package object zio {
fa.map(f)
}

implicit val zManagedPar: Parallelizable[ZManaged] =
new Parallelizable[ZManaged] {

override def flatMap[R, E, A, B](fa: ZManaged[R, E, A], f: A => ZManaged[R, E, B]): ZManaged[R, E, B] =
fa.flatMap(f)

override def map[R, E, A, B](fa: ZManaged[R, E, A], f: A => B): ZManaged[R, E, B] =
fa.map(f)

override def zipPar[R, E, A, B](left: ZManaged[R, E, A], right: ZManaged[R, E, B]): ZManaged[R, E, (A, B)] =
left.zipWithPar(right)((_, _))

}

}

0 comments on commit 0af3a41

Please sign in to comment.