Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some awkward imports #4659

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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