Skip to content

Commit

Permalink
Merge pull request #184 from rossabaker/0.10.1
Browse files Browse the repository at this point in the history
Backports for v0.10.1
  • Loading branch information
rossabaker authored Apr 17, 2018
2 parents 86a3240 + 26485a0 commit 4ed75fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ startYear in ThisBuild := Some(2017)

val CompileTime = config("CompileTime").hide

val CatsVersion = "1.0.1"
val CatsVersion = "1.1.0"
val SimulacrumVersion = "0.11.0"

val ScalaTestVersion = "3.0.4"
Expand Down
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/cats/effect/Effect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ trait Effect[F[_]] extends Async[F] {

object Effect {
/**
* [[Effect]] instance built for `cats.data.WriterT` values initialized
* [[Effect]] instance built for `cats.data.EitherT` values initialized
* with any `F` data type that also implements `Effect`.
*/
implicit def catsEitherTEffect[F[_]: Effect]: Effect[EitherT[F, Throwable, ?]] =
Expand Down
7 changes: 5 additions & 2 deletions core/shared/src/main/scala/cats/effect/IO.scala
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ sealed abstract class IO[+A] extends internals.IOBinaryCompat[A] {
* // Sample
* val source = IO.shift *> IO(1)
* // Describes execution
* val start = source.runAsync
* val start = source.runAsync {
* case Left(e) => IO(e.printStackTrace())
* case Right(_) => IO.unit
* }
* // Safe, because it does not block for the source to finish
* start.unsafeRunSync
* }}}
Expand All @@ -172,7 +175,7 @@ sealed abstract class IO[+A] extends internals.IOBinaryCompat[A] {
* token that can be used to send a cancel signal
*/
final def runAsync(cb: Either[Throwable, A] => IO[Unit]): IO[Unit] = IO {
unsafeRunAsync(cb.andThen(_.unsafeRunAsync(_ => ())))
unsafeRunAsync(cb.andThen(_.unsafeRunAsync(Callback.report)))
}

/**
Expand Down

0 comments on commit 4ed75fa

Please sign in to comment.