Skip to content

Commit

Permalink
Update cats-effect version to 3.2.9 (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeal18 authored Nov 8, 2021
1 parent 66b2ad8 commit be8aaac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ lazy val root = project

val zioVersion = "1.0.12"
val catsVersion = "2.6.1"
val catsEffectVersion = "3.1.1"
val catsEffectVersion = "3.2.9"
val catsMtlVersion = "1.2.1"
val disciplineScalaTestVersion = "2.1.5"
val fs2Version = "3.0.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,8 @@ trait GenIOInteropCats {
*/
def genSuccess[E, A: Arbitrary]: Gen[IO[E, A]] = Gen.oneOf(genSyncSuccess[E, A], genAsyncSuccess[E, A])

/**
* Given a generator for `E`, produces a generator for `IO[E, A]` using the `IO.fail` constructor.
*/
def genSyncFailure[E: Arbitrary, A]: Gen[IO[E, A]] = Arbitrary.arbitrary[E].map(IO.fail[E](_))

/**
* Given a generator for `E`, produces a generator for `IO[E, A]` using the `IO.async` constructor.
*/
def genAsyncFailure[E: Arbitrary, A]: Gen[IO[E, A]] =
Arbitrary.arbitrary[E].map(err => IO.effectAsync[E, A](k => k(IO.fail(err))))

/**
* Randomly uses either `genSyncFailure` or `genAsyncFailure` with equal probability.
*/
def genFailure[E: Arbitrary, A]: Gen[IO[E, A]] = Gen.oneOf(genSyncFailure[E, A], genAsyncFailure[E, A])

/**
* Randomly uses either `genSuccess` or `genFailure` with equal probability.
*/
def genIO[E: Arbitrary, A: Arbitrary]: Gen[IO[E, A]] =
Gen.oneOf(genSuccess[E, A], genFailure[E, A])
def genIO[E, A: Arbitrary]: Gen[IO[E, A]] =
genSuccess[E, A]

def genUIO[A: Arbitrary]: Gen[UIO[A]] =
Gen.oneOf(genSuccess[Nothing, A], genIdentityTrans(genSuccess[Nothing, A]))
Expand Down

0 comments on commit be8aaac

Please sign in to comment.