diff --git a/core/src/main/scala/cats/CoflatMap.scala b/core/src/main/scala/cats/CoflatMap.scala index ff26802c13..0d710528ee 100644 --- a/core/src/main/scala/cats/CoflatMap.scala +++ b/core/src/main/scala/cats/CoflatMap.scala @@ -16,7 +16,7 @@ import simulacrum.typeclass * * Example: * {{{ - * scala> import cats.std.option._ + * scala> import cats.implicits._ * scala> import cats.Monad * scala> import cats.CoflatMap * scala> val fa = Monad[Option].pure(3) @@ -35,7 +35,7 @@ import simulacrum.typeclass * * Example: * {{{ - * scala> import cats.std.option._ + * scala> import cats.implicits._ * scala> import cats.Monad * scala> import cats.CoflatMap * scala> val fa = Monad[Option].pure(3) diff --git a/core/src/main/scala/cats/Foldable.scala b/core/src/main/scala/cats/Foldable.scala index bf0089a53d..54303abdd3 100644 --- a/core/src/main/scala/cats/Foldable.scala +++ b/core/src/main/scala/cats/Foldable.scala @@ -92,8 +92,7 @@ import simulacrum.typeclass * * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ - * scala> import cats.std.option._ + * scala> import cats.implicits._ * scala> def parseInt(s: String): Option[Int] = Xor.catchOnly[NumberFormatException](s.toInt).toOption * scala> val F = Foldable[List] * scala> F.traverse_(List("333", "444"))(parseInt) @@ -118,7 +117,7 @@ import simulacrum.typeclass * * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ + * scala> import cats.implicits._ * scala> def parseInt(s: String): Xor[String, Int] = * | try { Xor.Right(s.toInt) } * | catch { case _: NumberFormatException => Xor.Left("boo") } @@ -145,8 +144,7 @@ import simulacrum.typeclass * For example: * * {{{ - * scala> import cats.std.list._ - * scala> import cats.std.option._ + * scala> import cats.implicits._ * scala> val F = Foldable[List] * scala> F.sequence_(List(Option(1), Option(2), Option(3))) * res0: Option[Unit] = Some(()) @@ -164,7 +162,7 @@ import simulacrum.typeclass * * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ + * scala> import cats.implicits._ * scala> val F = Foldable[List] * scala> F.sequenceU_(List(Xor.right[String, Int](333), Xor.Right(444))) * res0: Xor[String, Unit] = Right(()) @@ -188,7 +186,7 @@ import simulacrum.typeclass * For example: * * {{{ - * scala> import cats.std.list._ + * scala> import cats.implicits._ * scala> val F = Foldable[List] * scala> F.foldK(List(1 :: 2 :: Nil, 3 :: 4 :: 5 :: Nil)) * res0: List[Int] = List(1, 2, 3, 4, 5) diff --git a/core/src/main/scala/cats/arrow/Arrow.scala b/core/src/main/scala/cats/arrow/Arrow.scala index 81820db3fd..a7204cf8ae 100644 --- a/core/src/main/scala/cats/arrow/Arrow.scala +++ b/core/src/main/scala/cats/arrow/Arrow.scala @@ -16,7 +16,7 @@ trait Arrow[F[_, _]] extends Split[F] with Strong[F] with Category[F] { self => * * Example: * {{{ - * scala> import cats.std.function._ + * scala> import cats.implicits._ * scala> import cats.arrow.Arrow * scala> val fab: Double => Double = x => x + 0.3 * scala> val f: Int => Double = x => x.toDouble / 2 @@ -34,7 +34,7 @@ trait Arrow[F[_, _]] extends Split[F] with Strong[F] with Category[F] { self => * * Example: * {{{ - * scala> import cats.std.function._ + * scala> import cats.implicits._ * scala> import cats.arrow.Arrow * scala> val f: Int => Int = _ * 2 * scala> val fab = Arrow[Function1].first[Int,Int,Int](f) @@ -49,7 +49,7 @@ trait Arrow[F[_, _]] extends Split[F] with Strong[F] with Category[F] { self => * * Example: * {{{ - * scala> import cats.std.function._ + * scala> import cats.implicits._ * scala> import cats.arrow.Arrow * scala> val f: Int => Int = _ * 2 * scala> val fab = Arrow[Function1].second[Int,Int,Int](f) @@ -68,7 +68,7 @@ trait Arrow[F[_, _]] extends Split[F] with Strong[F] with Category[F] { self => * * Example: * {{{ - * scala> import cats.std.function._ + * scala> import cats.implicits._ * scala> import cats.arrow.Arrow * scala> val toLong: Int => Long = _.toLong * scala> val toDouble: Float => Double = _.toDouble diff --git a/core/src/main/scala/cats/arrow/Choice.scala b/core/src/main/scala/cats/arrow/Choice.scala index 0cf66249f5..df529e00cc 100644 --- a/core/src/main/scala/cats/arrow/Choice.scala +++ b/core/src/main/scala/cats/arrow/Choice.scala @@ -13,7 +13,7 @@ trait Choice[F[_, _]] extends Category[F] { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.std.function._ + * scala> import cats.implicits._ * scala> val b: Boolean => String = _ + " is a boolean" * scala> val i: Int => String = _ + " is an integer" * scala> val f: (Boolean Xor Int) => String = Choice[Function1].choice(b, i) @@ -34,7 +34,7 @@ trait Choice[F[_, _]] extends Category[F] { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.std.function._ + * scala> import cats.implicits._ * scala> val f: (Int Xor Int) => Int = Choice[Function1].codiagonal[Int] * * scala> f(Xor.right(3)) diff --git a/core/src/main/scala/cats/data/OptionT.scala b/core/src/main/scala/cats/data/OptionT.scala index 2754604656..8668e1508a 100644 --- a/core/src/main/scala/cats/data/OptionT.scala +++ b/core/src/main/scala/cats/data/OptionT.scala @@ -110,7 +110,7 @@ object OptionT extends OptionTInstances { * Note: The return type is a FromOptionPartiallyApplied[F], which has an apply method * on it, allowing you to call fromOption like this: * {{{ - * scala> import cats.std.list._ + * scala> import cats.implicits._ * scala> val o: Option[Int] = Some(2) * scala> OptionT.fromOption[List](o) * res0: OptionT[List, Int] = OptionT(List(Some(2))) diff --git a/core/src/main/scala/cats/data/StateT.scala b/core/src/main/scala/cats/data/StateT.scala index 169e7832d7..4b90add74f 100644 --- a/core/src/main/scala/cats/data/StateT.scala +++ b/core/src/main/scala/cats/data/StateT.scala @@ -85,7 +85,7 @@ final class StateT[F[_], S, A](val runF: F[S => F[(S, A)]]) extends Serializable * global state containing the various states needed for each individual `StateT`. * * {{{ - * scala> import cats.std.option._ // needed for StateT.apply + * scala> import cats.implicits._ // needed for StateT.apply * scala> type GlobalEnv = (Int, String) * scala> val x: StateT[Option, Int, Double] = StateT((x: Int) => Option((x + 1, x.toDouble))) * scala> val xt: StateT[Option, GlobalEnv, Double] = x.transformS[GlobalEnv](_._1, (t, i) => (i, t._2)) diff --git a/core/src/main/scala/cats/data/XorT.scala b/core/src/main/scala/cats/data/XorT.scala index e0bde5bf98..be129f4b6b 100644 --- a/core/src/main/scala/cats/data/XorT.scala +++ b/core/src/main/scala/cats/data/XorT.scala @@ -161,9 +161,7 @@ final case class XorT[F[_], A, B](value: F[A Xor B]) { * * Example: * {{{ - * scala> import cats.std.option._ - * scala> import cats.std.list._ - * scala> import cats.syntax.cartesian._ + * scala> import cats.implicits._ * scala> type Error = String * scala> val v1: Validated[NonEmptyList[Error], Int] = Validated.Invalid(NonEmptyList("error 1")) * scala> val v2: Validated[NonEmptyList[Error], Int] = Validated.Invalid(NonEmptyList("error 2")) @@ -192,7 +190,7 @@ trait XorTFunctions { * Note: The return type is a FromXorPartiallyApplied[F], which has an apply method * on it, allowing you to call fromXor like this: * {{{ - * scala> import cats.std.option._ + * scala> import cats.implicits._ * scala> val t: Xor[String, Int] = Xor.right(3) * scala> XorT.fromXor[Option](t) * res0: XorT[Option, String, Int] = XorT(Some(Right(3))) diff --git a/core/src/main/scala/cats/syntax/coproduct.scala b/core/src/main/scala/cats/syntax/coproduct.scala index 3abd78bbc8..95e8843873 100644 --- a/core/src/main/scala/cats/syntax/coproduct.scala +++ b/core/src/main/scala/cats/syntax/coproduct.scala @@ -18,7 +18,7 @@ final class CoproductOps[F[_], A](val fa: F[A]) extends AnyVal { * {{{ * scala> import cats.data.Coproduct * scala> import cats.Eval - * scala> import cats.syntax.coproduct._ + * scala> import cats.implicits._ * scala> List(1, 2, 3).leftc[Eval] * res0: Coproduct[List, Eval, Int] = Coproduct(Left(List(1, 2, 3))) * }}} @@ -34,7 +34,7 @@ final class CoproductOps[F[_], A](val fa: F[A]) extends AnyVal { * {{{ * scala> import cats.data.Coproduct * scala> import cats.Eval - * scala> import cats.syntax.coproduct._ + * scala> import cats.implicits._ * scala> List(1, 2, 3).rightc[Eval] * res0: Coproduct[Eval, List, Int] = Coproduct(Right(List(1, 2, 3))) * }}} diff --git a/core/src/main/scala/cats/syntax/either.scala b/core/src/main/scala/cats/syntax/either.scala index 36c9c102d7..4d886ba933 100644 --- a/core/src/main/scala/cats/syntax/either.scala +++ b/core/src/main/scala/cats/syntax/either.scala @@ -15,7 +15,7 @@ final class EitherOps[A, B](val eab: Either[A, B]) extends AnyVal { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.syntax.either._ + * scala> import cats.implicits._ * * scala> val i: Either[String, Int] = Right(3) * scala> i.toXor diff --git a/core/src/main/scala/cats/syntax/flatMap.scala b/core/src/main/scala/cats/syntax/flatMap.scala index a4d4cb332c..68f697c34f 100644 --- a/core/src/main/scala/cats/syntax/flatMap.scala +++ b/core/src/main/scala/cats/syntax/flatMap.scala @@ -25,8 +25,7 @@ final class FlatMapOps[F[_], A](fa: F[A])(implicit F: FlatMap[F]) { * * Example: * {{{ - * scala> import cats.std.list._ - * scala> import cats.syntax.flatMap._ + * scala> import cats.implicits._ * scala> List("12", "34", "56").mproduct(_.toList) * res0: List[(String, Char)] = List((12,1), (12,2), (34,3), (34,4), (56,5), (56,6)) * }}} @@ -48,8 +47,7 @@ final class FlatMapOps[F[_], A](fa: F[A])(implicit F: FlatMap[F]) { * * {{{ * scala> import cats.Eval - * scala> import cats.std.option._ - * scala> import cats.syntax.flatMap._ + * scala> import cats.implicits._ * scala> val fa: Option[Int] = Some(3) * scala> def fb: Option[String] = Some("foo") * scala> fa.followedByEval(Eval.later(fb)) @@ -68,7 +66,7 @@ final class FlattenOps[F[_], A](ffa: F[F[A]])(implicit F: FlatMap[F]) { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.syntax.flatMap._ + * scala> import cats.implicits._ * scala> type ErrorOr[A] = String Xor A * scala> val x: ErrorOr[ErrorOr[Int]] = Xor.right(Xor.right(3)) * scala> x.flatten @@ -86,7 +84,7 @@ final class IfMOps[F[_]](fa: F[Boolean])(implicit F: FlatMap[F]) { * Example: * {{{ * scala> import cats.{Eval, Now} - * scala> import cats.syntax.flatMap._ + * scala> import cats.implicits._ * * scala> val b1: Eval[Boolean] = Now(true) * scala> val asInt1: Eval[Int] = b1.ifM(Now(1), Now(0)) diff --git a/core/src/main/scala/cats/syntax/foldable.scala b/core/src/main/scala/cats/syntax/foldable.scala index d71a7628e7..b4df275aa5 100644 --- a/core/src/main/scala/cats/syntax/foldable.scala +++ b/core/src/main/scala/cats/syntax/foldable.scala @@ -22,9 +22,7 @@ final class NestedFoldableOps[F[_], G[_], A](fga: F[G[A]])(implicit F: Foldable[ * * Example: * {{{ - * scala> import cats.std.list._ - * scala> import cats.std.set._ - * scala> import cats.syntax.foldable._ + * scala> import cats.implicits._ * * scala> val l: List[Set[Int]] = List(Set(1, 2), Set(2, 3), Set(3, 4)) * scala> l.foldK diff --git a/core/src/main/scala/cats/syntax/monadCombine.scala b/core/src/main/scala/cats/syntax/monadCombine.scala index 423894f45d..5808cc7007 100644 --- a/core/src/main/scala/cats/syntax/monadCombine.scala +++ b/core/src/main/scala/cats/syntax/monadCombine.scala @@ -17,9 +17,7 @@ final class MonadCombineOps[F[_], G[_], A](fga: F[G[A]])(implicit F: MonadCombin * * Example: * {{{ - * scala> import cats.std.list._ - * scala> import cats.std.vector._ - * scala> import cats.syntax.monadCombine._ + * scala> import cats.implicits._ * scala> val x: List[Vector[Int]] = List(Vector(1, 2), Vector(3, 4)) * scala> x.unite * res0: List[Int] = List(1, 2, 3, 4) @@ -36,8 +34,7 @@ final class SeparateOps[F[_], G[_, _], A, B](fgab: F[G[A, B]])(implicit F: Monad * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ - * scala> import cats.syntax.monadCombine._ + * scala> import cats.implicits._ * scala> val l: List[Xor[String, Int]] = List(Xor.right(1), Xor.left("error")) * scala> l.separate * res0: (List[String], List[Int]) = (List(error),List(1)) diff --git a/core/src/main/scala/cats/syntax/option.scala b/core/src/main/scala/cats/syntax/option.scala index d7491527ae..536f6faf24 100644 --- a/core/src/main/scala/cats/syntax/option.scala +++ b/core/src/main/scala/cats/syntax/option.scala @@ -18,7 +18,7 @@ final class OptionIdOps[A](val a: A) extends AnyVal { * * Example: * {{{ - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * scala> 3.some * res0: Option[Int] = Some(3) * }}} @@ -35,7 +35,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * * scala> val error1: Option[String] = Some("error!") * scala> error1.toLeftXor(3) @@ -56,7 +56,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * * scala> val result1: Option[Int] = Some(3) * scala> result1.toRightXor("error!") @@ -77,7 +77,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * Example: * {{{ * scala> import cats.data.Validated - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * * scala> val error1: Option[String] = Some("error!") * scala> error1.toInvalid(3) @@ -99,7 +99,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * Example: * {{{ * scala> import cats.data.ValidatedNel - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * * scala> val error1: Option[String] = Some("error!") * scala> error1.toInvalidNel(3) @@ -120,7 +120,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * Example: * {{{ * scala> import cats.data.Validated - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * * scala> val result1: Option[Int] = Some(3) * scala> result1.toValid("error!") @@ -141,7 +141,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * Example: * {{{ * scala> import cats.data.ValidatedNel - * scala> import cats.syntax.option._ + * scala> import cats.implicits._ * * scala> val result1: Option[Int] = Some(3) * scala> result1.toValidNel("error!") @@ -160,8 +160,7 @@ final class OptionOps[A](val oa: Option[A]) extends AnyVal { * * Example: * {{{ - * scala> import cats.syntax.option._ - * scala> import cats.std.string._ + * scala> import cats.implicits._ * * scala> val someString: Option[String] = Some("hello") * scala> someString.orEmpty diff --git a/core/src/main/scala/cats/syntax/traverse.scala b/core/src/main/scala/cats/syntax/traverse.scala index 56ac664682..ea5917b8dd 100644 --- a/core/src/main/scala/cats/syntax/traverse.scala +++ b/core/src/main/scala/cats/syntax/traverse.scala @@ -22,9 +22,7 @@ final class TraverseOps[F[_], A](fa: F[A])(implicit F: Traverse[F]) { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ - * scala> import cats.std.option._ - * scala> import cats.syntax.traverse._ + * scala> import cats.implicits._ * scala> def parseInt(s: String): Option[Int] = Xor.catchOnly[NumberFormatException](s.toInt).toOption * scala> List("1", "2", "3").traverse(parseInt) * res0: Option[List[Int]] = Some(List(1, 2, 3)) @@ -41,8 +39,7 @@ final class TraverseOps[F[_], A](fa: F[A])(implicit F: Traverse[F]) { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ - * scala> import cats.syntax.traverse._ + * scala> import cats.implicits._ * scala> def parseInt(s: String): Xor[String, Int] = Xor.catchOnly[NumberFormatException](s.toInt).leftMap(_ => "no number") * scala> val ns = List("1", "2", "3") * scala> ns.traverseU(parseInt) @@ -60,9 +57,7 @@ final class TraverseOps[F[_], A](fa: F[A])(implicit F: Traverse[F]) { * Example: * {{{ * scala> import cats.data.Xor - * scala> import cats.std.list._ - * scala> import cats.std.option._ - * scala> import cats.syntax.traverse._ + * scala> import cats.implicits._ * scala> def parseInt(s: String): Option[Int] = Xor.catchOnly[NumberFormatException](s.toInt).toOption * scala> val x = Option(List("1", "two", "3")) * scala> x.traverseM(_.map(parseInt)) @@ -77,9 +72,7 @@ final class TraverseOps[F[_], A](fa: F[A])(implicit F: Traverse[F]) { * * Example: * {{{ - * scala> import cats.std.list._ - * scala> import cats.std.option._ - * scala> import cats.syntax.traverse._ + * scala> import cats.implicits._ * scala> val x: List[Option[Int]] = List(Some(1), Some(2)) * scala> val y: List[Option[Int]] = List(None, Some(2)) * scala> x.sequence @@ -97,8 +90,7 @@ final class TraverseOps[F[_], A](fa: F[A])(implicit F: Traverse[F]) { * Example: * {{{ * scala> import cats.data.{Validated, ValidatedNel} - * scala> import cats.std.list._ - * scala> import cats.syntax.traverse._ + * scala> import cats.implicits._ * scala> val x: List[ValidatedNel[String, Int]] = List(Validated.valid(1), Validated.invalid("a"), Validated.invalid("b")).map(_.toValidatedNel) * scala> x.sequenceU * res0: cats.data.ValidatedNel[String,List[Int]] = Invalid(OneAnd(a,List(b))) diff --git a/docs/src/main/tut/applicative.md b/docs/src/main/tut/applicative.md index 490a2da3d8..0f8823585f 100644 --- a/docs/src/main/tut/applicative.md +++ b/docs/src/main/tut/applicative.md @@ -22,7 +22,7 @@ obvious. For `Option`, the `pure` operation wraps the value in ```tut:book import cats._ -import cats.std.all._ +import cats.implicits._ Applicative[Option].pure(1) Applicative[List].pure(1) diff --git a/docs/src/main/tut/apply.md b/docs/src/main/tut/apply.md index e3db5b72d1..7d6a5b91d9 100644 --- a/docs/src/main/tut/apply.md +++ b/docs/src/main/tut/apply.md @@ -121,7 +121,7 @@ In order to use it, first import `cats.syntax.all._` or `cats.syntax.cartesian._ Here we see that the following two functions, `f1` and `f2`, are equivalent: ```tut:book -import cats.syntax.cartesian._ +import cats.implicits._ def f1(a: Option[Int], b: Option[Int], c: Option[Int]) = (a |@| b |@| c) map { _ * _ * _ } diff --git a/docs/src/main/tut/const.md b/docs/src/main/tut/const.md index 225f4a1a01..8790c5b4c7 100644 --- a/docs/src/main/tut/const.md +++ b/docs/src/main/tut/const.md @@ -80,7 +80,7 @@ only thing we need is a `map` operation on the data type. Being good functional ```tut:silent import cats.Functor -import cats.syntax.functor._ +import cats.implicits._ trait Lens[S, A] { def get(s: S): A diff --git a/docs/src/main/tut/freeapplicative.md b/docs/src/main/tut/freeapplicative.md index f9534a8e77..600f707598 100644 --- a/docs/src/main/tut/freeapplicative.md +++ b/docs/src/main/tut/freeapplicative.md @@ -44,7 +44,7 @@ Because a `FreeApplicative` only supports the operations of `Applicative`, we do of a for-comprehension. We can however still use `Applicative` syntax provided by Cats. ```tut:silent -import cats.syntax.cartesian._ +import cats.implicits._ val prog: Validation[Boolean] = (size(5) |@| hasNumber).map { case (l, r) => l && r} ``` @@ -55,7 +55,7 @@ at this point. To make our program useful we need to interpret it. ```tut:silent import cats.Id import cats.arrow.FunctionK -import cats.std.function._ +import cats.implicits._ // a function that takes a string as input type FromString[A] = String => A @@ -95,7 +95,7 @@ write a validator that validates in parallel. ```tut:silent import cats.data.Kleisli -import cats.std.future._ +import cats.implicits._ import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global @@ -125,7 +125,7 @@ we can completely ignore the return type of the operation and return just a `Lis ```tut:silent import cats.data.Const -import cats.std.list._ +import cats.implicits._ type Log[A] = Const[List[String], A] diff --git a/docs/src/main/tut/kleisli.md b/docs/src/main/tut/kleisli.md index 8505b7513b..75da513ba4 100644 --- a/docs/src/main/tut/kleisli.md +++ b/docs/src/main/tut/kleisli.md @@ -63,7 +63,7 @@ compose two `Kleisli`s much like we can two functions. ```tut:silent import cats.FlatMap -import cats.syntax.flatMap._ +import cats.implicits._ final case class Kleisli[F[_], A, B](run: A => F[B]) { def compose[Z](k: Kleisli[F, Z, A])(implicit F: FlatMap[F]): Kleisli[F, Z, B] = @@ -75,7 +75,7 @@ Returning to our earlier example: ```tut:silent // Bring in cats.FlatMap[Option] instance -import cats.std.option._ +import cats.implicits._ val parse = Kleisli((s: String) => try { Some(s.toInt) } catch { case _: NumberFormatException => None }) @@ -125,10 +125,7 @@ An example of a `Monad` instance for `Kleisli` is shown below. *Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/non/kind-projector) and will not compile if it is not being used in a project. ```tut:silent -import cats.syntax.flatMap._ -import cats.syntax.functor._ -// Alternatively we can import cats.implicits._ to bring in all the -// syntax at once (as well as all type class instances) +import cats.implicits._ // We can define a FlatMap instance for Kleisli if the F[_] we chose has a FlatMap instance // Note the input type and F are fixed, with the output type left free diff --git a/docs/src/main/tut/monoid.md b/docs/src/main/tut/monoid.md index 6acbe6e48f..97a05cb2e6 100644 --- a/docs/src/main/tut/monoid.md +++ b/docs/src/main/tut/monoid.md @@ -28,7 +28,6 @@ First some imports. ```tut:silent import cats._ -import cats.std.all._ import cats.implicits._ ``` diff --git a/docs/src/main/tut/semigroup.md b/docs/src/main/tut/semigroup.md index 79d153acf9..5b522b6fa3 100644 --- a/docs/src/main/tut/semigroup.md +++ b/docs/src/main/tut/semigroup.md @@ -31,7 +31,6 @@ First some imports. ```tut:silent import cats._ -import cats.std.all._ import cats.implicits._ ``` @@ -67,9 +66,7 @@ following the convention from scalaz, that `|+|` is the operator from `Semigroup`. ```tut:silent -import cats.syntax.all._ import cats.implicits._ -import cats.std._ val one = Option(1) val two = Option(2) diff --git a/docs/src/main/tut/semigroupk.md b/docs/src/main/tut/semigroupk.md index 2cd8cb1f02..5895b481ad 100644 --- a/docs/src/main/tut/semigroupk.md +++ b/docs/src/main/tut/semigroupk.md @@ -39,7 +39,7 @@ scala common library: ```tut:silent import cats._ -import cats.std.all._ +import cats.implicits._ ``` Examples. @@ -97,9 +97,7 @@ There is inline syntax available for both `Semigroup` and from `SemigroupK` (called `Plus` in scalaz). ```tut:silent -import cats.syntax.all._ import cats.implicits._ -import cats.std._ val one = Option(1) val two = Option(2) diff --git a/docs/src/main/tut/traverse.md b/docs/src/main/tut/traverse.md index 22373a33e9..3691bb5f3c 100644 --- a/docs/src/main/tut/traverse.md +++ b/docs/src/main/tut/traverse.md @@ -92,8 +92,7 @@ trivially satisfy the `F[_]` shape required by `Applicative`. ```tut:silent import cats.Semigroup import cats.data.{NonEmptyList, OneAnd, Validated, ValidatedNel, Xor} -import cats.std.list._ -import cats.syntax.traverse._ +import cats.implicits._ def parseIntXor(s: String): Xor[NumberFormatException, Int] = Xor.catchOnly[NumberFormatException](s.toInt) @@ -188,7 +187,7 @@ for instance a `List[Option[A]]`. To make this easier to work with, you want a ` Given `Option` has an `Applicative` instance, we can traverse over the list with the identity function. ```tut:book -import cats.std.option._ +import cats.implicits._ val l1 = List(Option(1), Option(2), Option(3)).traverse(identity) val l2 = List(Option(1), None, Option(3)).traverse(identity) ``` @@ -212,7 +211,7 @@ def writeToStore(data: Data): Future[Unit] = ??? If we traverse using this, we end up with a funny type. ```tut:silent -import cats.std.future._ +import cats.implicits._ import scala.concurrent.ExecutionContext.Implicits.global def writeManyToStore(data: List[Data]) = @@ -227,7 +226,7 @@ is common, so `Foldable` (superclass of `Traverse`) provides `traverse_` and `se same thing as `traverse` and `sequence` but ignores any value produced along the way, returning `Unit` at the end. ```tut:silent -import cats.syntax.foldable._ +import cats.implicits._ def writeManyToStore(data: List[Data]) = data.traverse_(writeToStore) diff --git a/docs/src/main/tut/validated.md b/docs/src/main/tut/validated.md index e4ba7ead44..216d5f9704 100644 --- a/docs/src/main/tut/validated.md +++ b/docs/src/main/tut/validated.md @@ -147,7 +147,7 @@ Time to parse. ```tut:silent import cats.SemigroupK import cats.data.NonEmptyList -import cats.std.list._ +import cats.implicits._ case class ConnectionParams(url: String, port: Int) diff --git a/docs/src/main/tut/xor.md b/docs/src/main/tut/xor.md index 6944f4d673..a2ce2696ad 100644 --- a/docs/src/main/tut/xor.md +++ b/docs/src/main/tut/xor.md @@ -365,7 +365,7 @@ val xor: Xor[Throwable, Int] = ## Additional syntax ```tut:book -import cats.syntax.xor._ +import cats.implicits._ val xor3: Xor[String, Int] = 7.right[String]