CHANGES.md
2021 April 20
Cats 2.6.0 is a binary-compatible release in the 2.x series. It provides support for Scala 2.12, 2.13, 3.0.0-RC2 and 3.0.0-RC3.
Alternative[Set] in alleycats by @rtyley2021 March 29
Cats 2.5.0 is a binary-compatible release in the 2.x series. It provides support for Scala 2.12, 2.13, 3.0.0-RC1 and 3.0.0-RC2.
ApplicativeError by @wibisono2021 February 10
This release fixes a problem in Cats 2.4.0. It is not binary compatible with Cats 2.4.0. We urge everyone to skip 2.4.0 and upgrade directly to 2.4.1.
Cats 2.4.1 is a hotfix release in the 2.x series. It is binary compatible to every previous release in the 2.x series, except for Cats 2.4.0.
The following release notes contain all cumulative changes since Cats 2.3.1.
implicit has been made un-implicit, but another implicit with a different semantics has been provided (core)implicit method as implicit (alleycats)2021 February 9
Cats 2.4.0 contains an unintended source-breaking change, please upgrade directly to 2.4.1.
2020 December 18
Cats 2.3.1 adds support for Scala 3.0.0-M3 and is published for Scala 2.12, 2.13, and 3.0.0-M2 as well.
ApplicativeThrow and MonadThrow to cats package object (from cats-effect) (@agustafson)2020 November 26
Welcome to the first stable release of Cats on Scala 3… milestone 2! We will continue releasing minor versions within the 2.3.x lineage against Scala 3.0.0 until it reaches a final stable release. The decision to push a stable release of Cats in advance of this date was made in order to simplify versioning within the downstream ecosystem.
immutable.Seq (@JosephMoniz)distinct to TraverseFilter (@takayahilton)2020 November 6 🍂
Added support for Scala/Dotty 3.0.0-M1.
simulacrum-scalafix-annotations to the classpath, build for 3.0.0-M1 by @djspiewak2020 October 31 🎃
The purpose of this milestone is that adventurous users can try out first-class Dotty support before we cut a final 2.3.0 release. Note that for the Dotty builds, binary compatibility between this milestone release and 2.3.0 may break in some situations. Also, if you are using the laws, sbt may complain about conflicting Scala version suffixes. This will be fixed in time for the final release.
distinct for TraverseFilter by @takayahiltonimmutable.Seq by @JosephMonizFunctionK by @bplommertraverseTap by @majk-pdefer and fix in Defer by @johnynekzipWithIndex stack safety by @dantbscalafixAll to migrate test code as well by @bjaglinApplicativeError by @dhinojosaWriter and WriterT by @benkio2020 September 3
toValidated to TrySyntax by @gagandeepkalra2020 August 21
2020 August 15
Eval.now early by @bastewart_2020 July 21
StateT.fromState turning State[A, F[B]] into StateT[F,A, B] is added. by @akopich2020 July 6
_2020 June 17
2020 May 25
2020 March 31
getOrElse in NonEmptyList#last by @PeterPerhacorElseRaise syntax for ApplicativeError by @kubukoztraverse and traverseFilter by @gagandeepkalraFoldable doctest to use separateFoldable instead of separate by @gagandeepkalra2020 February 25
This release introduces support for Scala.js 1.0.0. There are no changes since 2.1.0 for the Scala.js 0.6 or JVM artifacts. This is likely to be the last Cats release supporting Scala.js 0.6, and we encourage Scala.js users to upgrade to 1.0.0 as soon as possible.
2019 December 18
This release currently only supports Scala 2.12 and 2.13. It provides the same binary compatibility guarantees as Cats 2.0 (note that it is not guaranteed to be binary-compatible with the 2.1.0 release candidates).
2019 December 11
This release candidate provides the same binary compatibility guarantees as Cats 2.0.
filterNot to FunctorFilter by @gagandeepkalra_2019 November 26
This release candidate provides the same binary compatibility guarantees as Cats 2.0.
2019 November 15
This release is currently only available for Scala 2.11 and Scala 2.12. It provides the same binary compatibility guarantees as Cats 2.0 (and is verified by MiMa to be fully binary-compatible with 2.0 itself).
ifF on Functor #3040 by @vasiliybondarenko2019 September 9
Cats 2.0.0 is available for Scala 2.11, 2.12, 2.13, and Scala.js 0.6. This release maintains binary compatibility with Cats 1.x.x in the cats-kernel, cats-core and cats-free modules, but not cats-laws, cats-kernel-laws, cats-testkit, or alleycats.
2019 September 7
Cats 2.0.0-RC3 is the third release candidate for Cats 2.0, and is available for Scala 2.11, 2.12, 2.13, and Scala.js 0.6. This release (like the upcoming 2.0.0) maintains binary compatibility with Cats 1.x.x in the cats-kernel, cats-core and cats-free modules, but not cats-laws, cats-kernel-laws, cats-testkit, or alleycats.
2019 August 26
Cats 2.0.0-RC2 is the second release candidate for Cats 2.0, and is available for Scala 2.11, 2.12, 2.13, and Scala.js 0.6. This release (like the upcoming 2.0.0) maintains binary compatibility with Cats 1.x.x in the cats-kernel, cats-core and cats-free modules, but not cats-laws, cats-kernel-laws, cats-testkit, or alleycats.
2019 August 5
Cats 2.0.0-RC1 is the first release candidate for Cats 2.0, It's available on Scala 2.11, 2.12, 2.13 and Scala.js 0.6. Cats 2.0.0-RC1 (like the upcoming 2.0.0 release) maintains binary compatibility with Cats 1.x.x in the cats-kernel, cats-core and cats-free modules, but not cats-laws, cats-kernel-laws, cats-testkit, or alleycats.
Stream in ExhaustiveCheck with List by @kailuowangNonEmptyLazyList to replace NonEmptyStream by @kailuowang2019 June 11
Cats 2.0.0-M4 is a milestone release for Cats 2.0 that's available on Scala 2.11, 2.12, 2.13 and Scala.js 0.6. Cats 2.0.0-M4 (like the upcoming 2.0.0 release) maintains binary compatibility with Cats 1.x.x in the cats-kernel, cats-core and cats-free modules, but not cats-laws, cats-kernel-laws, cats-testkit, or alleycats.
2019 June 3
Cats 1.6.1 is binary compatible with all previous 1.x Cats releases.
2019 June 1
Cats 2.0.0-M3 is a milestone release for Cats 2.0 that's available on Scala 2.11, 2.12, 2.13.0-RC3 and Scala.js 0.6. Cats 2.0.0-M3 (like the upcoming 2.0.0 release) maintains binary compatibility with Cats 1.x.x in the cats-kernel, cats-core and cats-free modules, but not cats-laws, cats-kernel-laws, cats-testkit, or alleycats.
cats.laws.discipline.eq methods (by @kailuowang).Kleisli is now covariant in the input type (by @jcouyang).Order methods (by @orvi).2019 May 25
Cats 2.0.0-M2 is a milestone release for Cats 2.0. It's available on Scala 2.11, Scala 2.12, Scala 2.13.0-RC2 and Scala.js 0.6. Cats 2.0.0-M2 maintains binary compatibility on cats-kernel, cats-core and cats-free with Cats 1.x.x. Their 2.0.0-M2 jars are drop-in replacements for 1.0.1, 1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, and 2.0.0-M1 jars. cats-kernel, cats-core and cats-free 2.0.0 will remain binary compatible with 1.x. Cats 2.0.0-M2 breaks binary compatibility on cats-laws, cats-kernel-laws, cats-testkit and alleycats.
ListWrapper with Option by @kailuowang2019 April 24
Cats 2.0.0-M1 is a milestone release for Cats 2.0. It's available on Scala 2.11, Scala 2.12, Scala 2.13.0-RC1 and Scala.js 0.6. Cats 2.0.0-M1 maintains binary compatibility on cats-kernel, cats-core and cats-free with Cats 1.x.x. Their 2.0.0-M1 jars are drop-in replacements for 1.0.1, 1.1.0, 1.2.0, 1.3.1, 1.4.0, 1.5.0 and 1.6.0 jars. cats-kernel, cats-core and cats-free 2.0.0 will remain binary compatible with 1.x. Cats 2.0.0-M1 breaks binary compatibility on cats-laws, cats-kernel-laws, cats-testkit and alleycats.
foldF to EitherT by @kailuowangobject CommutativeApplicative to get CommutativeMonoid by @alexeygorobetsTraverseFilter instance for Set to alleycats by @dcastrotoFreeT to Free by @jcouyangadaptErr to ApplicativeErrorOps by @bplommerdefer factory method to ContT by @cb3722019 Jan 31
Cats 1.6.0 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0, 1.2.0, 1.3.1, 1.4.0 and 1.5.0 jars. 1.6.0 is mostly identical to 1.6.0-RC1 except one additional feature enhancement.
2019 Jan 22
Cats 1.6.0-RC1 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0, 1.2.0, 1.3.1, 1.4.0 and 1.5.0 jars.
It brought you:
sequenceFilter syntax by @kubukozapplyK function to Kleisli. by @diesalblarethrowT method to EitherT by @bplommerflatTap by @mtomkoproductL in cats glossary by @mtomko2018 Nov 30
Cats 1.5.0 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0, 1.2.0, 1.3.1 and 1.4.0 jars.
The artifacts are identical to Cats 1.5.0-RC1. For changes since 1.4.0 please check release notes of Cats 1.5.0-RC0 and Cats 1.5.0-RC1.
2018 Nov 19
Cats 1.5.0-RC1 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0, 1.2.0, 1.3.1 and 1.4.0 jars.
It brought you:
2018 Nov 8
Cats 1.5.0-RC0 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0, 1.2.0, 1.3.1 and 1.4.0 jars.
1.5.0-RC0 brought
Apply methods in FlatMap by @kailuowangupdateWith method to NonEmptyMap by @nasadorianChain#distinct and NonEmptyChain#distinct to match List#distinct and NonEmptyList#distinct by @fmsbeekmanscats-collections as an external cats module by @kailuowang2018 Sep 12
Cats 1.4.0 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0, 1.2.0, and 1.3.1 jars. Cats 1.3.1 introduced an unnecessary runtime dependency (scala-collection-compat), this 1.4.0 release removes it.
1.4.0 also brought you:
F[G[A]] by @zarthross2018 Sep 5
Cats 1.3.1 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0 and 1.2.0 jars. Cats 1.3.1 does not support Scala 2.10.
This is a bug fix release that fixed the binary compatibility breakage when summoning Monad[OptionT[F, ?]] in 1.3.0
2018 Sep 4
Cats 1.3.0 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1, 1.1.0 and 1.2.0 jars. There is a bug in this release that breaks binary compatibility when summoning Monad[OptionT[F, ?]].
Cats 1.3.0 does not support Scala 2.10.
1.3.0 brought you:
Cats 1.2.0 is binary compatible with all previous 1.x Cats releases, i.e. its jar is a drop-in replacement for 1.0.1 and 1.1.0 jars.
Cats 1.2.0 is also the last non-patch release that supports Scala 2.10. Farewell Scala 2.10.
1.2.0 brought you:
liftTo syntax to Validated. by @kailuowang.nested syntax.. by @danielkarchorElse to ApplicativeError. by @barambaniCats 1.1.0 is binary compatible with 1.0.1, i.e. its jar is a drop-in replacement for the 1.0.1 jar.
1.1.0 brought you:
reject (partial function) method to MonadError by @WoganFoldable, Traverse and Comonad instances to WriterT by @barambaniliftTo to Try, Either and Option by @kailuowangleftNel and rightNel syntax by @kailuowangcontains_, foldSmash and mkString_ to FoldableOps by @rsoeldnerEndo type alias for (A => A) by @kailuowang2017 Dec 31
There is zero code change since 1.0.0. This is a release to fix the 1.0.0-MF issue that on Maven 1.0.0-MF is deemed later than 1.0.0. For details see #2131
2017 Dec 25
product{L,R} instead of ap{L,R} by @rossabakerApply by @ceedubs2017 Dec 18
Applicative#traverse and Applicative#sequence by @kubukozliftF and add liftK to transformers by @SystemFwInvariantSemigroupal and ability to turn Monoidals to Monoids by @LukaJCBfoldl and foldr aliases to Foldable by @felixmuldercollectFirst and collectFirstSome to Foldable by @kailuowangIor.fromEither by @markus1189MonadError.rethrow by @SystemFwmerge (product) to Arrow for arrows composition by @marcobattagliaComparison to cats package by @kailuowangPartialOrder to PartialOrdering and Hash to Hashing by @kailuowangcomparison method in Order companion object by @ceedubsIor.fromOptions by @markus11892017 Oct 21
This is the only planned release candidate release prior to 1.0.0.
Order instance for NonEmptyList's groupBy function by @igstanCartesian to Semigroupal by @kailuowangFlatMap's >> and << by @LukaJCBEitherT.liftT to EitherT.liftF by @aeonsfunctor by @kailuowangReaderWriterStateT to IndexedReaderWriterStateT by @iravidStateT to IndexedStateT by @iravidMonoidK and SemigroupK instance for Kleisli by @peterneyensNonEmptyList and NonEmptyVector methods by @durbanInvariant instances for kernel type classes by @LukaJCBiterateRight in Foldable sound by @LukaJCBSortedMap and SortedSet instances/Move Set and Map instances to Alleycats by @LukaJCB/@kailuowangmapK to transformers by @andyscott / @LukaJCBTo migrate from 1.0.0-MF.
Cartesian to Semigroupal and EitherT.liftT to EitherT.liftF can be done automatically through Scalafix we provide. See instructions here.FlatMap's >> and <<, use Apply's *> and <* instead.Profunctor and Strong were moved to the cats.arrow package, Bifunctor, Invariant and Contravariant were moved to the cats root package.SemigroupK[λ[α => Kleisli[F, α, α]]] and MonoidK[λ[α => Kleisli[F, α, α]]] are no longer implicitly available, Use Kleisli.endoSemigroupK and Kleisli.endoMonoidK to get them explicitly.cats.kernel was made consistent with the law testing in cats.core. Check here for a guide on how to test cats type class instances.NonEmptyList.concat that takes NonEmptlyList was deprecated, use NonEmptyList.concatNel instead.Monoid no longer has a InvariantMonoidal instance, we discovered that it's not lawful. It has have an Invariant and a Semigroupal (new name for Cartesian) instance.Foldable.iterateRight now takes an Iterable instead of Iterator, see #1973 for rationale.Foldable for Set and Traversable for Map were moved to Alleycats, see #1831 for rationale.cats.data.Kleisli#transform and cats.free.Coyoneda#transform were deprecated and replaced by mapKFlatMap#flatTap, a more principled version of the kestrel combinator. by @hrhinoHash (#1712): Queue/Duration by @ctongfeitraverseN to cartesian syntax by @julien-truffautguard to Alternative by @SystemFwApplicativeError.fromEither by @tpolecatFreeApplicative.product by @peterneyensNonEmptyList.ofInitLast by @eddsteelEval. by @nonzipWith to NonEmptyList and NonEmptyVector by @LukaJCBNonEmptyList#partitionE by @LukaJCBBiFunctor by @LukaJCBFoldable and Traversable instances for Free by @aaronlevinmap2Eval in progress by @johnynekCartesian syntax implicit parameter by @DavidGregory084existsM and forallM to Foldable by @refriedfold in Validated for better performance by @kailuowangCommutativeApply and CommutativeApplicative by @LukaJCBParallel type class by @LukaJCBValidated.cond and Validated.condNel by @andyscottiterateRight in Foldable sound by @LukaJCBStateT and IndexedStateT by @iravidArrow composition by @raymondtayValidated beginners doc by @AlejandroMESemigroupK scaladoc by @LukaJCBWriterT tests by @LukaJCBTraverse#traverseWithIndexM by @LukaJCBgrafter to the list of Typelevel projects using cats by @etorreborreIor by @LukaJCBEval documentation by @LukaJCBFoldable.existsM/forallM to docs by @refriedShow by @LukaJCBEq docs by @LukaJCBNonEmptyTraverse docs by @LukaJCBReducible docs by @LukaJCBCokleisli by @raymondtayfollowedBy/forEffect tests to ApplyTests by @peterneyensAlternative law checking for IndexedStateT. by @iravidEitherT.cond. by @andyscottRenameInjectProdAndCoproduct, RenameTupleApplySyntax and RemoveSplit Scalafix rewrites by @gabrocontramap by @LukaJCB2017 Aug 3
MF stands for milestone final. This is the last non-RC release before 1.0.0.
The main purpose/focus of this release is to offer a relatively stable API to
work with prior to 1.0.0. It can be deemed as a proposal for the final API
we are going to maintain binary compatibility after 1.0.
We will give community some time to validate it before we release 1.0.0-RC1.
We apologize for the number of breaking changes in this release. We are trying to include as many breaking changes as possible in this release before we lock down the API.
cats no longer publishes the all-inclusive bundle package "org.typelevel" % "cats", use cats-core, cats-free, or cats-law
accordingly instead. If you need cats.free, use "org.typelevel" % "cats-free", if you need cats-laws use
"org.typelevel" % "cats-laws", if neither, use "org.typelevel" % "cats-core".cats.free.Inject is moved from cats-free to cats-core and renamed to cats.InjectK;
cats.data.Prod is renamed to cats.data.Tuple2K; cats.data.Coproduct is renamed to
cats.data.EitherKUnapply enabled methods, e.g. sequenceU, traverseU, etc. are removed. Unapply
enabled syntax ops are also removed. Please use the partial unification SI-2712 fix
instead. The easiest way might be this sbt-plugin.FunctorFilter, MonadFilter, MonadReader, MonadState, MonadTrans, MonadWriter and TraverseFilter are no longer in cats, the functionalities they provided are inherited by the new cats-mtl project. Please check here for migration guide.MonadCombine is no longer in cats. Use Alternative or Monad + MonoidK instead.CartesianBuilder (i.e. |@|) syntax is deprecated, use the apply syntax on tuples instead. E.g. (x |@| y |@| z).map(...) should be replaced by (x, y, z).mapN(...). If you are getting "mapN not found" error message, it could be due to SI-2712, see the 3rd migration item above.(x, y, z).map3(...)) was moved from cats.syntax.tuple._ to cats.syntax.apply._ and renamed to mapN, contramapN and imapN respectively.left, right, apply, pure, etc.) in EitherT were improved to take less
type arguments.cats-core type class instances for cats.kernel were moved from their companion objects to separate traits
and thus require imports from cats.instances.xxx._ (or the recommended import cats.implicits._) now. See #1659 for more details.Free.suspend is renamed to Free.defer for consistency.traverse1_, intercalate1 and sequence1_ in Reducible were renamed to nonEmptyTraverse_, nonEmptyIntercalate and nonEmptySequence_ respectively.foldLeftM is removed from Free, use foldM on Foldable instead, see #1117 for detail.iteratorFoldM was removed from Foldable due to #1716Split is removed, and the method split is moved to Arrow. Note that only under CommutativeArrow does it guarantee the non-interference between the effects. see #1567If you feel adventurous you can try the experimental Scalafix rewrites. See all the available rewrites and the instructions here.
leftT and improved existing lift API for EitherT. by @kailuowangInject to InjectK. by @andyscottProd, Coproduct to Tuple2K and EitherK. by @kailuowangUnapply class. by @kailuowangInject. @selloutsuspend to defer. by @peterneyenstraverse1_, intercalate1 and sequence1_ in Reducible. by @LukaJCBfoldLeftM without Free. by @TomasMikulaApply syntax for tuples. by @DavidGregory084CartesianBuilder. by @kailuowangSplit with CommutativeArrow, introduces CommutativeMonad. by @diesalblaFunctorFilter, MonadCombine, MonadFilter, MonadReader, MonadState, MonadTrans, MonadWriter, TraverseFilter. by @edmundnobleMonadTrans instance for RWST and make MonadTrans serializable.Validated.validNel. by @edmundnobleMonadState.NonEmptyList. by @jtjeferreiraValidated and Either (#1550). by @LukaJCBReaderWriterStateT data type . by @iravidReaderWriterStateT. by @peterneyensNonEmptyList#fromFoldable. by @markus1189NonEmptyTraverse. by @LukaJCBBitSet to allInstances. by @kailuowangApplicative.unit. by @alexandruStateT to laws. by @kailuowanggroupBy to NonEmptyList and groupByNel to List syntax @julien-truffautlast, sortBy and sorted to NonEmptyList. by @julien-truffautwhileM, untilM, iterateWhile, etc to Monad . by @tpolecat & @kailuowangMonadError instance for Ior. by @leandrob13MonadError instance for Kleisli. by @durbanIor syntax. by @leandrob13FlatMap.forEffect. by @cranst0nMonadError. by @peterneyensInject for free programs. by @tpolecatget for Foldable. by @yilinweiCoyoneda. by @edmundnobleInjectK laws. by @andyscottAs class which represents subtyping relationships (Liskov). by @stewIs constructor for Leibniz equality. by @telNonEmptyTraverse typeclass. by @LukaJCBStackSafeMonad mixin. by @djspiewakInject for Either. by @andyscottEitherNel type alias for Either[NonEmptyList[E], A]. by @andyscottOrder-> Ordering implicit conversion to implicits, instances. by @edmundnobleShow inherit from a contravariant base trait for show string interpolator to be covariant. by @edmundnobleTraverse. by @andyscottKleisli tap, tapWith. by @tpolecatonError and adaptError to ApplicativeError/MonadError. by @SystemFwMonadError instance for EitherT that recovers from F[_] errors. by @leandrob13FreeAppplicative. by @edmundnobleNonEmptyList#Collect . by @xavier-fernandezfromTry and fromEither for Try and Either. by @peterneyensInjectK to allow for extension by other libraries. by @andyscottInjectK use FunctionK.id for reflexive injection. by @andyscottKleisli instances. by @peterneyensFoldable methods. by @peterneyensPartialApplied class value class to achieve zero cost. by @kailuowangsyntax.show extend ShowSyntax instead of Show.ToShowOps. by @edmundnobleFunctionK . by @ceedubsEq[Function1] in testsJS; break JS build to separate matrix build. by @kailuowangCogen for arbitrary instances. by @ceedubsFreeApplicative doc.. by @takayukyRelated Projects list. by @raulrajaFunctionK document. by @kailuowangEitherT. by @jtjeferreiraDiscipline and ScalaTest. by @peterneyensInvariantMonoidal. by @BenFradetId docs in the menu. by @ceedubsCokleisli. by @peterneyensKleisli example. by @RawToasttailRecM doc. by @kailuowangGroup.remove. by @LukaJCBOneAnd alias. by @peterneyensFreeMonads doc. by @cb372MonadError and ApplicativeError to hierarchy diagram. by @kailuowangMonad ifM example. by @sullivan-Eval methods Unit, True, False, Zero, One. by @sullivan-Applicative doc.. by @cranst0n.html files instead of .md. by @LukaJCB2017 January 15
The biggest user-facing change in this release is to the behavior of the flatMap (and related methods) provided by EitherOps for the standard library's Either for Scala 2.10 and 2.11. These methods now match the behavior of the flatMap on Either in Scala 2.12 in that they don't require the left-hand side types to match.
For example, the following would previously compile on 2.12, but not 2.10 or 2.11:
import cats.syntax.either._
sealed abstract class AppError
case object Error1 extends AppError
case object Error2 extends AppError
val either1: Either[Error1.type, String] = Right("hi")
val either2: Either[Error2.type, String] = Right("bye")
val result: Either[AppError, String] = for {
v1 <- either1
v2 <- either2
} yield v1 + v2
This code now works equivalently on all supported Scala versions.
Changes:
NonEmptyList and NonEmptyVector are now covariantflatMap provided by Either syntax matches 2.12's Either#flatMapStateTcatchNonFatal for Future is now asynchronousBug fixes:
New type class instances:
Other additions:
Cofree comonadintercalate for Foldable (and intercalate1 for Reducible)asLeft and asRight syntax methods for creating Either valuestupleLeft and tupleRight for FunctorputLeft, putRight, mergeLeft, and mergeRight methods for Iorshow string interpolatorValidated#findValid (like orElse but error accumulating)reverse for NonEmptyListzipWithIndex for NonEmptyListfilterNot for NonEmptyList and NonEmptyVectorFunctionK#andEitherT.condMiscellaneous improvements (syntax, documentation, tests):
Functor, Applicative, and TraverseSemigroup and MonoidSemigroupK and MonoidK instancesAnd version updates:
As always thanks to everyone who filed issues, participated in the Cats Gitter channel, submitted code, or helped review pull requests.
2016 November 9
Version 0.8.1 is a release to support Scala 2.12.0 with no changes to published code (only tests and documentation).
Build:
Miscellaneous improvements (syntax, documentation, tests):
defaultTailRecM from monad docArbitrary instances for ScalaCheck 1.13.3+2016 October 25
Version 0.8.0 is the eighth Cats release, and the first release with support for Scala 2.12 (specifically the 2.12.0-RC2 release candidate).
Apart from the introduction of Scala 2.12 support, the biggest change in this release is the removal
of Xor and XorT. See the FAQ for information about
the motivations for this change and recommendations for migration.
Removals and deprecations:
Xor and XorT are goneRecursiveTailRecM and Free#foldMapUnsafe are gone and stack safety is checked in the laws for MonadFreeT#interpret is deprecated in favor of the (equivalent) compileAdditions:
Foldable#iteratorFoldM and lazy foldM implementations for many standard library instancesappend and prepend (and operator aliases) for NonEmptyVectorEitherT.fromOptionStateT.set and StateT.setFStateT.getWriterT.liftMonadReader#readerFunctionK.lift<<< and >>> aliases for Compose's compose and andThentoNestedValidated and toNestedValidatedNel for EitherTOrder.fromComparableTraverse#flatSequenceMonadTests#stackUnsafeMonad laws for instances where tailRecM is known to be unsafecompile and foldMap for the Free and FreeT companion objectsNew instances:
Order and Group for BigDecimalSemigroup for IorOrder for SymbolPartialOrder and other instances for BitSetEq and PartialOrder for EitherPartialOrder, Monoid, and other instances for Function0Monoid and other instances for Function1Monad, MonadCombine, Traverse, Order, etc. for ProdMonadError for StateTjava.util.UUIDRenaming and rearrangements:
cats.js.std package is now cats.js.instancesTraverse#traverseM is now flatTraverseMiscellaneous improvements (syntax, documentation, tests):
combineAll and combineAllOptionEither instancesFunctionK tests and examples now use kind-projector 0.9's polymorphic lambdasCoproduct#run with Coproduct#foldtailRecM-flatMap consistency checkingFunctionKBuild:
2016 September 1
Version 0.7.2 is a patch release that was released to fix a major bug (#1346) that appeared in 0.7.0. It also contains several other improvements.
It should be safe to upgrade from 0.7.0 to 0.7.2 -- there are no major API changes between these releases.
Fixes:
Monoid[Map[K, V]].combineAll implementation.CoflatMap documentation.release, validate, etc.).Additions:
Note that 0.7.2 was preceded by a botched 0.7.1. release. Please avoid using this version of Cats -- it has major incompatibilities with 0.7.0 and is not documented here.
2016 August 21
Version 0.7.0 is the seventh Cats release, and includes several major rearrangements and changes to names.
If you're updating from Cats 0.6.0, it's likely that you'll need to make extensive (but mostly mechanical) changes. The following list includes some of the changes that are likely to be necessary for most projects; see the complete list of changes below for more detail.
cats.std will need to be changed to cats.instances (#1140). If you're using cats.std.all or the other cats.std objects with wildcard imports, this is likely to be the only change you need to make. If you are importing or referring to instance definitions by name, you'll need to be aware that the naming convention has changed (see #1066, #1068, #1110, and #1122).NonEmptyList and NonEmptyVector are no longer type aliases for OneAnd, so any code using OneAnd to construct or pattern match on these types will need to be changed to use NonEmptyList or NonEmptyVector directly. There are also some API changes; for example, unwrap calls will need to be replaced by toList or toVector, and NonEmptyList(1, 2, 3) is now NonEmptyList.of(1, 2, 3).pureEval has been removed from Applicative (#1234), and has not been replaced, so if you are relying on it for laziness or effect capturing (which wasn't enforced or guaranteed), you'll need to find another approach.NaturalTransformation will need to be replaced by either FunctionK or ~>.FlatMap type class now has a tailRecM method that is designed to support stack-safe recursive monadic binding. If your monad's flatMap is stack safe, you can implement a stack-safe tailRecM by calling Monad#defaultTailRecM. The stack safety of tailRecM is not enforced, but if your implementation is stack safe, you should also provide an instance of the RecursiveTailRecM marker type class.F with foldMap, you'll now need F to have an instance of the RecursiveTailRecM marker type class (in addition to the Monad instance).If you run into any issues while updating, please get in touch on Gitter.
This release includes a fix for a bug in 0.6.0 (also fixed in 0.6.1):
Order instances for tuples are now lexicographic (instead of only comparing first elements)And other bug fixes:
inj and prj on Inject now work consistently with respect to nullAnd some additions:
EitherT and improved Either syntaxFlatMap now has a tailRecM methodRecursiveTailRecM marker type class indicating that tailRecM is stack safeFreeT monad transformerFunctorFilter and TraverseFiltervalueOr and merge for ValidatedtoValidatedNel for XorTtoTry for XorcatchNonFatal for ApplicativeErrorisEmpty syntax method for Monoidminimum, maximum, and related helper methods for Foldable and Reducibledistinct on NonEmptyList and NonEmptyVectorcats.syntax.list for à la carte list syntax importscats.syntax.monoid for à la carte Monoid syntax importsIdT, the identity monad transformerNested (represents nested composition of type constructors)toNested for OptionT and XorTComparison (represents the result of an Order comparison)Kleisli.liftlift, inspect, and related methods for StateTsize for FoldablereduceLeftM for Reduciblewiden for Functor and narrow for Contravariant)tell for Writer and WriterT, value for WriterXorT valuesrunTailRec and foldLeftM for FreeContravariantCartesian type classAnd some name changes:
cats.std is now cats.instancesNaturalTransformation is now FunctionKmapSuspension on Free is now compileFree.Gosub is now Free.FlatMappedComposite* traits for binary type classes are renamed to Composed* for consistency (and are now private)And other API changes:
NonEmptyList is now a case class instead of a type alias for a OneAndNonEmptyVector is now a value class instead of a type alias for a OneAndapply on NonEmptyList and NonEmptyVector is now ofApplicative#pureEval has been removedMonadFilter no longer has a filterM method (see #1225)foldMap on Free now requires a MonadRec instance (instead of simply Monad)Free.suspend no longer requires an Applicative instancetoString for Free and FreeApplicativeXor and related typesAnd many new instances:
Monoid, MonadError, and other instances for scala.util.TryMonad for Tuple2Contravariant for EqTraverse and Comonad for Tuple2Order, MonadError, and other instances for OptionTSemigroup and Monoid for XorTSemigroupK and MonadCombine for StateTSemigroup and Monoid for ApplicativeCoflatMap for WriterTMonadRec instances for Eval, StateT, and FutureUnapply instances for Nested shapesAnd miscellaneous improvements to style and performance:
And improvements to the documentation:
contramap signatureTraverse documentationAnd the build:
We also welcome Kailuo Wang, Peter Neyens, and Oscar Boykin as new Cats maintainers!
2016 July 14
Version 0.6.1 is a patch release compatible with 0.6.0.
It contains one bug fix:
It also contains a change to the build:
2016 May 19
Version 0.6.0 is the sixth release.
Highlights of this release:
This release also includes some API changes:
ApplicativeErrorSyntax for F[_] instead of F[_, _]Xor and XorT combineAnd additions:
Coproduct foldwithFilter for OptionTMonoid instance for WriterTApplicativeError instance for Kleisli and a MonadError[Option, Unit] to std.optionXorT#fromEitherValidated.ensureTraverse.traverseMAnd some code improvements:
Apply.map2Eval and allow traverse lazinessPartialOrder to return original instanceEq[Vector[A]] instanceFuture#successful in pureEval when possibleAnd bug fixes:
And some other improvements to the organization documentation, tutorials, laws and tests, including:
OptionT documentation from the monad docs.~> with NaturalTransformationnelSemigroup from traverse docasMeetPartialOrder and asJoinPartialOrder2016 April 28
Version 0.5.0 is the fifth release.
This release includes some API changes:
cats.laws.discipline.eq no longer provides Eq instances for Tuple2 and Tuple3, these instances and together with some other new instances for Tuples are now provided by cats.std.tuple (through inheriting the instance trait defined in algebra 0.4.2).
Streaming and StreamingTproduct and map can be implemented in terms of apKleisli#applyto apAnd additions:
LiftTrans type classBifoldable.get method to StateTApplicative syntaxmap method to OneAndXorT.ensure methodfoldMtell and writer syntax for creating Writers.BitraverseShow instancesTransLiftOptionT.noneApplicativeErrortoValidatedNel to XorflatMapF for StateTreducible for reducible syntaxSemigroupK instance for XorSemigroupK instance for ValidatedBitraverse instances for Validated and XorTAnd bug fixes:
OptionIdOps.some to always return SomeId instances to idInstances to make selective import easierAnd removals:
Streaming and StreamingTAnd some other improvements to the documentation, tutorials, laws and tests, including:
Eq[Vector[A]] instanceStateT's runEmptyA()Coproduct and WriterTTraverse.sequence in Applicative.sequenceReducible lawsCall.loop @tailrec optimized-P:scalajs:mapSourceURI optionBifunctor universalUnapply serializableKleisli readableProd testsMonadState testsReducible testsinvariant docscats.syntax.apply._As always thanks to everyone who filed issues, participated in the Cats Gitter channel, submitted code, or helped review pull requests.
2016 February 4
Version 0.4.1 is a patch release in the 0.4 series and is binary compatible with version 0.4.0.
This patch fixes bugs with the dropWhile methods on Streaming and
StreamingT.
This release corrects outdated build/POM metadata, which should fix API doc URLS.
Bug fixes:
Streaming and StreamingT dropWhile functionsBuild/publishing changes:
Documentation and site improvements:
2016 February 1
Version 0.4.0 is the fourth release of the Cats library, and the first release
published under the org.typelevel group from the
Typelevel organization on GitHub (previous
releases had been published to org.spire-math from non/cats). This means
that users will need to change the groupId for their Cats dependencies when
updating. If you have a line like this in your sbt build configuration, for
example:
libraryDependencies += "org.spire-math" %% "cats" % "0.3.0"
You will need to change it to the following:
libraryDependencies += "org.typelevel" %% "cats" % "0.4.0"
This release no longer includes cats-state or cats-free artifacts, since
the cats.state and cats.free packages have been moved into cats-core.
If you've checked out the GitHub repository locally, it would be a good idea to
update your remote to point to the new organization, which will typically look
like this (note that you should confirm that origin is the appropriate
remote name):
git remote set-url origin [email protected]:typelevel/cats.git
This release includes a large number of breaking changes, including most
prominently the introduction of a new Cartesian type class that is a supertype
of Monad (and many other types). If you use the |@| syntax that had
previously been provided by Apply, you'll need to change your imports from
cats.syntax.apply._ to cats.syntax.cartesian._. For example:
scala> import cats.Eval, cats.syntax.cartesian._
import cats.Eval
import cats.syntax.cartesian._
scala> (Eval.now("v") |@| Eval.now(0.4)).tupled
res0: cats.Eval[(String, Double)] = cats.Eval$$anon$5@104f8bbd
Other changes in this release are described below.
This version includes API changes:
|@| syntax is now
provided by cats.syntax.cartesianState and StateT are
now in the cats.data packagecombine on SemigroupK
is now combineKap has been reversed (now function first)ap on
CartesianBuilderN is now apWithState now uses Eval
instead of Trampoline for stack safetyor for natural
transformations is now an instance methodorElse on XorT and
does not unnecessarily constrain the type of the left side of the resultProduct and Serializable to improve type inferenceProdInstancesN names
changed for consistencyEval is now
SerializableValidatedFoldable's sequence_ has been removedAnd additions:
CartesianCoproduct and InjectApplicativeErrorState and Free (and
related types) are now in the core moduleValidated now has an
andThen method that provides binding (but without the for-comprehension
syntactic sugar that the name flatMap would bring)sequenceU_ and
traverseU_ on FoldabletransformS for StateTvalueOr for XorTorElse for XorTgetOrElseF for XorTswap for Validatedtransform and
subflatMap on OptionT and XorTcompose for
Alternative and composeK for MonoidKOptionT.liftFAnd removals:
Free and
FreeApplicative constructors are now privatefilter on ValidatedMonadCombine instances
for OptionTKleisli's redundant
lmap, which was equivalent to localCokleisli.cokleisli,
which was equivalent to Cokleisli.applyXorTMonadCombineAnd new type class instances:
Traverse and Foldable
instances for XorTFunction1WriterTBifunctor instances for
WriterTSemigroup and Monoid
instances for ValidatedSemigroup instances for
Xor and ConstCoflatMap instance for
VectorContravariant instances
for Const and KleisliId instances for
KleisliReducible instances for
OneAndTraverse instances for
OneAndTraverse instance
for IdShow instances for
Vector and StreamAnd bug fixes:
dropWhile_ on FoldableStreamingStreaming.thunkfoldMap on FreeApplicativefilter on
StreamingTdrop on
StreamingTEval.CallAnd some dependency updates:
There are also many improvements to the documentation, tutorials, laws, tests, and benchmarks, including the following:
InvariantFree
documentationFoldableArrowFreeApplicativeEvalArbitrary
instances for Streaming and StreamingTtoString
for StreamingTProfunctorXor, XorT, and EitherState and StateTmap / flatMap
coherenceKleisliCokleisliKleisli and Cokleisli compositionUnapply-supported syntaxKnown issues:
foldMap on Free, but raised other issues (see
#712) and was reverted in
#713;
#721 now tracks the non-stack
safety of Free's foldMapAs always thanks to everyone who filed issues, participated in the Cats Gitter channel, submitted code, or helped review pull requests.
2015 November 8
Version 0.3.0 is the third release of the Cats library.
This version includes new type class instances:
Semigroup instances for
OneAndMonoid instances for Xor
when the left side has a Semigroup instance and the right side has a
MonoidMonoid instances for SetBifunctor instances for
Validated, Ior, Xor, and XorTFunctor instances for
OptionT when F has a Functor instance but not a MonadShow instances for Option
and OptionTShow instances for ListShow instances for SetUnapply shapesAnd API changes:
fromTryCatch on Xor and
Validated is now catchOnlyMonadError now characterizes
type constructors of kind * -> * instead of (*, *) -> *OneAnd's type constructor type
parameter is now before the element typeXorT's toOption returns an
OptionT[F, B] instead of an F[Option[B]]Free's resume method now
returns an Xor instead of an EitherorElse on Xor and
Validated does not unnecessarily constrain the type of the left side of the
result*Aux helper classes have been
renamed *PartiallyAppliedAnd additions:
WriterTIor.fromOptionsOptionT.fromOptionhandleErrorWith and related
helper methods on MonadErrortoNel and fromList
conversions from List to NonEmptyListFoldable instances and StreamingisJvm and isJs macros in the
new cats.macros.Platformanalyze on FreeApplicative
for compilation into a MonoidValidatedAnd several aliases:
FlatMapSyntax now includes
followedBy, which is an alias for >>, together with a new
followedByEval, which allows the caller to choose the evaluation strategy of
the second actionFoldable now has a
combineAll method that aliases fold and allows postfix usage via
FoldableSyntaxAnd a few removals:
FreeApplicative's redundant
hoist, which was equivalent to compileCoyoneda's byAnd bug fixes:
empty values for
Monoid[Double] and Monoid[Float] are now 0 instead of 1Streaming.take(n).toList no
longer evaluates the n + 1-st elementOneAnd's instances are
properly prioritizedThere are also many improvements to the documentation, tutorials, laws, tests, and benchmarks:
=== now uses Eq
instancesTraverse's laws verify the
consistency of foldMap and traverseEvalThanks to everyone who filed issues, participated in the Cats Gitter channel, submitted code, or helped review pull requests.
2015 August 31
Version 0.2.0 is the second release of the Cats library.
The most exciting feature of this release is Scala.js support, which
comes courtesy of much hard work by the Scala.js community (especially
Alistair Johnson). The sbt build configuration and project layout were
updated to support building for both the JVM and JS platforms.
Since the 0.1.2 release there was wide agreement that the split
between cats-core and cats-std was awkward. The two projects have
been combined into cats-core, meaning that type class instances for
common types like List are now available in cats-core.
There was also a concerted effort to improve and add documentation to the project. Many people helped find typos, broken links, and places where the docs could be improved. In particular, the following tutorials were added or overhauled:
ApplicativeConstFoldableFreeFreeApplicativeKleisliMonadMonoidSemigroupSemigroupKTraverseValidatedXorSeveral new type classes and data types were introduced:
Choice[F[_, _]]Group[A]MonadReader[F[_, _], R]Streaming[A] and StreamingT[F[_], A]Prod[F[_], G[_], A] and Func[F[_], A, B]Syntax tests were added to ensure that existing syntax worked, and there has been some movement to enrich existing types with syntax to make converting them to Cats types easier.
The previous Fold[A] type, which was used to support lazy folds, has
been replaced with Eval[A]. This type supports both strict and lazy
evaluation, supports lazy map and flatMap, and is trampolined for
stack safety. The definition of Foldable#foldRight has been updated
to something much more idiomatic and easier to reason about. The goal
is to support laziness in Cats via the Eval[A] type wherever
possible.
In addition to these specific changes there were numerous small bug fixes, additions, improvements, and updates. Thanks to everyone who filed issues, participated in the Cats Gitter channel, submitted code, or helped review pull requests.
2015 July 17
(Due to problems with publishing 0.1.0 and 0.1.1 are incomplete.)
Version 0.1.2 is the first non-snapshot version of the Cats library! It is intended to assist the creation of dependent libraries and to be an early look at Cats' design.
Much of the library is quite mature, but there are no source- or binary-compatibility guarantees at this time. The overarching design of the library is still somewhat in flux, although mostly we expect there will be new type classes, instances, and syntax. Some package and module boundaries may also shift.
For complete credits, see AUTHORS.md for a list of people whose work has made this release possible.