Skip to content

Commit

Permalink
fix some awkward imports
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed Sep 28, 2024
1 parent b6d9092 commit 1e78fe8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/Bifunctor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ trait Bifunctor[F[_, _]] extends Serializable { self =>
* Lift left into F using Applicative.
* * Example:
* {{{
* scala> import cats.implicits._
* scala> import cats.syntax.all._
* scala> val x0: Either[String, Int] = Either.left("foo")
* scala> val x1: Either[List[String], Int] = x0.leftLiftTo[List]
* }}}
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/scala/cats/Functor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ trait Functor[F[_]] extends Invariant[F] { self =>
* Example:
* {{{
* scala> import cats.Functor
* scala> import cats.implicits.catsStdInstancesForOption
* scala> import cats.syntax.all._
*
* scala> val o = Option(42)
* scala> Functor[Option].lift((x: Int) => x + 10)(o)
Expand Down Expand Up @@ -189,7 +189,7 @@ trait Functor[F[_]] extends Invariant[F] { self =>
*
* {{{
* scala> import cats.Functor
* scala> import cats.implicits.catsStdInstancesForList
* scala> import cats.syntax.all._
*
* scala> Functor[List].unzip(List((1,2), (3, 4)))
* res0: (List[Int], List[Int]) = (List(1, 3),List(2, 4))
Expand All @@ -203,7 +203,7 @@ trait Functor[F[_]] extends Invariant[F] { self =>
* Example:
* {{{
* scala> import cats.Functor
* scala> import cats.implicits.catsStdInstancesForList
* scala> import cats.syntax.all._
*
* scala> Functor[List].ifF(List(true, false, false))(1, 0)
* res0: List[Int] = List(1, 0, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ class IndexedStateTSuite extends CatsSuite {

test("fromState correctly turns State[A, F[B]] into StateT[F, A, B]") {
val state: State[Int, Option[Int]] = add1.map(Some.apply)
import cats.implicits.catsStdInstancesForOption
forAll { (initial: Int) =>
assert(StateT.fromState(state).run(initial).get === {
val (s, Some(result)) = state.run(initial).value: @unchecked // non-exhaustive match warning
Expand Down

0 comments on commit 1e78fe8

Please sign in to comment.