Skip to content

Commit

Permalink
Merge pull request #245 from typelevel/bump-cats
Browse files Browse the repository at this point in the history
Bump Cats to 1.0.1 and version to 0.4.1
  • Loading branch information
adelbertc authored Feb 8, 2018
2 parents 6506254 + 3c4c97d commit 15c7c36
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
val sparkVersion = "2.2.0"
val catsCoreVersion = "1.0.0-MF"
val catsEffectVersion = "0.4"
val catsMtlVersion = "0.0.2"
val catsCoreVersion = "1.0.1"
val catsEffectVersion = "0.8"
val catsMtlVersion = "0.2.2"
val scalatest = "3.0.3"
val shapeless = "2.3.2"
val scalacheck = "1.13.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class FramelessSyntaxTests extends TypedDatasetSuite {
def pure[A](x: A): ReaderT[IO, SparkSession, A] = ReaderT.pure(x)
def handleErrorWith[A](fa: ReaderT[IO, SparkSession, A])(f: Throwable => ReaderT[IO, SparkSession, A]): ReaderT[IO, SparkSession, A] =
ReaderT(r => fa.run(r).handleErrorWith(e => f(e).run(r)))
def raiseError[A](e: Throwable): ReaderT[IO, SparkSession, A] = ReaderT.lift(IO.raiseError(e))
def raiseError[A](e: Throwable): ReaderT[IO, SparkSession, A] = ReaderT.liftF(IO.raiseError(e))
def flatMap[A, B](fa: ReaderT[IO, SparkSession, A])(f: A => ReaderT[IO, SparkSession, B]): ReaderT[IO, SparkSession, B] = fa.flatMap(f)
def tailRecM[A, B](a: A)(f: A => ReaderT[IO, SparkSession, Either[A, B]]): ReaderT[IO, SparkSession, B] =
ReaderT.catsDataMonadForKleisli[IO, SparkSession].tailRecM(a)(f)
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/tut/Cats.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ implicit val sync: Sync[ReaderT[IO, SparkSession, ?]] = new Sync[ReaderT[IO, Spa
def pure[A](x: A): ReaderT[IO, SparkSession, A] = ReaderT.pure(x)
def handleErrorWith[A](fa: ReaderT[IO, SparkSession, A])(f: Throwable => ReaderT[IO, SparkSession, A]): ReaderT[IO, SparkSession, A] =
ReaderT(r => fa.run(r).handleErrorWith(e => f(e).run(r)))
def raiseError[A](e: Throwable): ReaderT[IO, SparkSession, A] = ReaderT.lift(IO.raiseError(e))
def raiseError[A](e: Throwable): ReaderT[IO, SparkSession, A] = ReaderT.liftF(IO.raiseError(e))
def flatMap[A, B](fa: ReaderT[IO, SparkSession, A])(f: A => ReaderT[IO, SparkSession, B]): ReaderT[IO, SparkSession, B] = fa.flatMap(f)
def tailRecM[A, B](a: A)(f: A => ReaderT[IO, SparkSession, Either[A, B]]): ReaderT[IO, SparkSession, B] =
ReaderT.catsDataMonadForKleisli[IO, SparkSession].tailRecM(a)(f)
Expand Down Expand Up @@ -101,7 +101,7 @@ And now, we can set the description for the computation being run:
val resultWithDescription: Action[(Seq[(Int, String)], Long)] = for {
r <- result.withDescription("fancy cats")
session <- ReaderT.ask[IO, SparkSession]
_ <- ReaderT.lift {
_ <- ReaderT.liftF {
IO {
println(s"Description: ${session.sparkContext.getLocalProperty("spark.job.description")}")
}
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.4.0"
version in ThisBuild := "0.4.1"

0 comments on commit 15c7c36

Please sign in to comment.