cats v1.0.0-MF Release Notes

  • 2017 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.

    To migrate from 0.9.0

    πŸš€ 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.EitherK
    • All Unapply 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.
    • Apply syntax on tuple (e.g. (x, y, z).map3(...)) was moved from cats.syntax.tuple._ to cats.syntax.apply._ and renamed to mapN, contramapN and imapN respectively.
    • The creation methods (left, right, apply, pure, etc.) in EitherT were improved to take less type arguments.
    • Several 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 #1716
    • Split 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 #1567

    If you feel adventurous you can try the experimental Scalafix rewrites. πŸ‘€ See all the available rewrites and the instructions here.

    πŸ’₯ Breaking Changes:

    • #1614: added leftT and improved existing lift API for EitherT. by @kailuowang
    • #1596: Rename Inject to InjectK. by @andyscott
    • #1589: Rename Prod, Coproduct to Tuple2K and EitherK. by @kailuowang
    • #1583: Enable SI-2712 fix in cats / Remove unapply machinery. by @kailuowang
    • #1679: remove Unapply class. by @kailuowang
    • #1557: Improvements to Inject. @sellout
    • #1659: move instances into separate trait. by @yilinwei
    • #1709: Rename suspend to defer. by @peterneyens
    • #1611: Renamed traverse1_, intercalate1 and sequence1_ in Reducible. by @LukaJCB
    • #1117: foldLeftM without Free. by @TomasMikula
    • #1487: Apply syntax for tuples. by @DavidGregory084
    • #1745: Deprecate CartesianBuilder. by @kailuowang
    • #1758: stop publishing cats all bundle , start to publish cats-testkit. by @kailuowang
    • #1766: Replace Split with CommutativeArrow, introduces CommutativeMonad. by @diesalbla
    • #1751: Removed FunctorFilter, MonadCombine, MonadFilter, MonadReader, MonadState, MonadTrans, MonadWriter, TraverseFilter. by @edmundnoble

    πŸ†• New Features (API, instances, data types, etc):

    • #1707: Add NEL/NEV one. by @peterneyens
    • #1680: MonadTrans instance for RWST and make MonadTrans serializable. by @wedens
    • #1658: Add Validated.validNel. by @edmundnoble
    • #1651: Add state method to MonadState. by @oskoi
    • #1628: add init and size methods to NonEmptyList. by @jtjeferreira
    • #1612: Add ensureWith to Validated and Either (#1550). by @LukaJCB
    • #1598: Implement a ReaderWriterStateT data type . by @iravid
    • #1706: Clean up ReaderWriterStateT. by @peterneyens
    • #1594: Add NonEmptyList#fromFoldable. by @markus1189
    • #1611: Added NonEmptyTraverse. by @LukaJCB
    • #1592: added instances of BitSet to allInstances. by @kailuowang
    • #1586: Add Applicative.unit. by @alexandru
    • #1584: Move arbitrary instance of StateT to laws. by @kailuowang
    • #1580: add groupBy to NonEmptyList and groupByNel to List syntax @julien-truffaut
    • #1578: add last, sortBy and sorted to NonEmptyList. by @julien-truffaut
    • #1571: added whileM, untilM, iterateWhile, etc to Monad . by @tpolecat & @kailuowang
    • #1548: MonadError instance for Ior. by @leandrob13
    • #1543: MonadError instance for Kleisli. by @durban
    • #1540: Ior syntax. by @leandrob13
    • #1537: Add FlatMap.forEffect. by @cranst0n
    • #1531: Add piecemeal import for MonadError. by @peterneyens
    • #1526: Inject for free programs. by @tpolecat
    • #1464: Adding get for Foldable. by @yilinwei
    • #1602: Stack-safe Coyoneda. by @edmundnoble
    • #1725: Add InjectK laws. by @andyscott
    • #1728: Adds an As class which represents subtyping relationships (Liskov). by @stew
    • #1178: Add Is constructor for Leibniz equality. by @tel
    • #1611: Add NonEmptyTraverse typeclass. by @LukaJCB
    • #1736: Added StackSafeMonad mixin. by @djspiewak
    • #1600: Inject for Either. by @andyscott
    • #1746: Add EitherNel type alias for Either[NonEmptyList[E], A]. by @andyscott
    • #1670: Add Order-> Ordering implicit conversion to implicits, instances. by @edmundnoble
    • #1649: Make Show inherit from a contravariant base trait for show string interpolator to be covariant. by @edmundnoble
      • #1761: Add index related helpers to Traverse. by @andyscott
      • #1769: Add Kleisli tap, tapWith. by @tpolecat
      • #1739: Add onError and adaptError to ApplicativeError/MonadError. by @SystemFw
      • #1644: Add MonadError instance for EitherT that recovers from F[_] errors. by @leandrob13
      • #1748: Stack-safe FreeAppplicative. by @edmundnoble
      • #1516: Implement NonEmptyList#Collect . by @xavier-fernandez

    Code improvements:

    • #1660: Override fromTry and fromEither for Try and Either. by @peterneyens
    • #1642: Unseal InjectK to allow for extension by other libraries. by @andyscott
    • #1641: Make InjectK use FunctionK.id for reflexive injection. by @andyscott
    • #1618: Override some methods in Kleisli instances. by @peterneyens
    • #1532: Override Foldable methods. by @peterneyens
    • #1456: Consistency for ops classes. by @edmundnoble
    • #1631: make all PartialApplied class value class to achieve zero cost. by @kailuowang
    • #1696: Make syntax.show extend ShowSyntax instead of Show.ToShowOps. by @edmundnoble

    πŸ› Bug fixes:

    • #1735: StateT no longer violates laws. by @djspiewak
    • 🚚 #1740: removed iteratorFoldM. by @kailuowang

    πŸ“š Other miscellaneous improvements (documentation, tests, build):

    • #1699: Link to sbt-partial-unification plugin . by @Blaisorblade
    • #1698: Update gitter chat room name to cats-dev. . by @kailuowang
    • #1695: update ETA for 1.0.0 . by @kailuowang
    • #1604: Add tut doc for FunctionK . by @ceedubs
    • #1691: Build JVM before JS on travis. by @peterneyens
    • #1677: Update readme with the new dev channel.. by @kailuowang
    • #1673: Use 2 workers in JVM build. by @ceedubs
    • #1671: Fixing Eq[Function1] in testsJS; break JS build to separate matrix build. by @kailuowang
    • #1666: Use Cogen for arbitrary instances. by @ceedubs
    • #1654: Update Circe URL. by @n4to4
    • #1653: Fix typo in FreeApplicative doc.. by @takayuky
    • #1647: Adds Freestyle to Related Projects list. by @raulraja
    • #1638: Make simulacrum a compile time only dependency. by @peterneyens
    • #1637: show(f:T) to show(t:T). by @PeterPerhac
    • #1636: added some category theory into FunctionK document. by @kailuowang
    • #1632: upgraded to scala 2.12.2 and 2.11.11 and scalaJs. by @kailuowang
    • #1629: add unit test for variance on methods in EitherT. by @jtjeferreira
    • #1622: Update Discipline and ScalaTest. by @peterneyens
    • #1615: Fix doc for InvariantMonoidal. by @BenFradet
    • #1609: Include Id docs in the menu. by @ceedubs
    • #1591: Improve test coverage. by @peterneyens
    • #1590: Check monad laws for Cokleisli. by @peterneyens
    • #1588: Docs/Tutorial -- Simplify Kleisli example. by @RawToast
    • #1581: restore the alphabetical order of maintainers list. by @kailuowang
    • #1575: minor improvements to tailRecM doc. by @kailuowang
    • #1570: fixed a paragraph order. by @kailuowang
    • #1566: Fix mistake in documentation of Group.remove. by @LukaJCB
    • #1563: Remove references of the NEL OneAnd alias. by @peterneyens
    • #1561: Fix incorrect numbering in FreeMonads doc. by @cb372
    • #1555: fix scala.js badge version. by @xuwei-k
    • #1551: added MonadError and ApplicativeError to hierarchy diagram. by @kailuowang
    • #1547: fix ref to non-existent dir in contributing. by @sullivan-
    • #1546: add to Monad ifM example. by @sullivan-
    • #1545: fix scaladoc for Eval methods Unit, True, False, Zero, One. by @sullivan-
    • #1541: Switch from CrossVersion.full to CrossVersion.patch for TLS compatibi…. by @milessabin
    • #1530: add a favicon for sbt-microsite. by @larsrh
    • #1529: Fix typo in Applicative doc.. by @cranst0n
    • #1525: Remove link to apply.html from menu. by @Leammas
    • #1693: Clean up EitherT doctests. by @peterneyens
    • #1697: Added two links to the learner page. by @kailuowang
    • #1726: Add underscore.io Advanced Scala with Cats. by @DieBauer
    • #1718: Fixed some things in the build. by @djspiewak
    • #1734: update sbt. by @jyane
    • #1737: Rewrote documentation on the IO monad to reference cats-effect. by @djspiewak
    • #1744: Make links link to the .html files instead of .md. by @LukaJCB
    • #1759: Faster tests by reducing the size of lists. @peterneyens
    • #1760: Decrease stack-safety test size. by @edmundnoble
    • #1752: More coverage. by @edmundnoble
    • #1472: Using regular syntax in the FreeApplicative tutorial. by @denisftw
    • #1565: added instance table to docs, enhanced typeclass diagram. by @kailuowang
    • #1573: Add symbols to FAQ. by @zainab-ali