|
| 1 | +## Version 0.9.0 |
| 2 | + |
| 3 | +> 2017 January 15 |
| 4 | +
|
| 5 | +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. |
| 6 | + |
| 7 | +For example, the following would previously compile on 2.12, but not 2.10 or 2.11: |
| 8 | + |
| 9 | +```scala |
| 10 | +import cats.syntax.either._ |
| 11 | + |
| 12 | +sealed abstract class AppError |
| 13 | +case object Error1 extends AppError |
| 14 | +case object Error2 extends AppError |
| 15 | + |
| 16 | +val either1: Either[Error1.type, String] = Right("hi") |
| 17 | +val either2: Either[Error2.type, String] = Right("bye") |
| 18 | + |
| 19 | +val result: Either[AppError, String] = for { |
| 20 | + v1 <- either1 |
| 21 | + v2 <- either2 |
| 22 | +} yield v1 + v2 |
| 23 | +``` |
| 24 | + |
| 25 | +This code now works equivalently on all supported Scala versions. |
| 26 | + |
| 27 | +Changes: |
| 28 | + |
| 29 | + * [#1424](https://github.com/typelevel/cats/pull/1424): `NonEmptyList` and `NonEmptyVector` are now covariant |
| 30 | + * [#1506](https://github.com/typelevel/cats/pull/1506): `flatMap` provided by `Either` syntax matches 2.12's `Either#flatMap` |
| 31 | + * [#1466](https://github.com/typelevel/cats/pull/1466): Improved stack safety for `StateT` |
| 32 | + * [#1510](https://github.com/typelevel/cats/pull/1510): `catchNonFatal` for `Future` is now asynchronous |
| 33 | + |
| 34 | +Bug fixes: |
| 35 | + |
| 36 | + * [#1465](https://github.com/typelevel/cats/pull/1465) and [#1507](https://github.com/typelevel/cats/pull/1507): Stack safety law for `Monad#tailRecM` is less eager and doesn't throw exceptions |
| 37 | + |
| 38 | +New type class instances: |
| 39 | + |
| 40 | + * [#1475](https://github.com/typelevel/cats/pull/1475): `Reducible` instances for `Eval` and `Id` |
| 41 | + * [#1484](https://github.com/typelevel/cats/pull/1484): `Show` instance for `Symbol` |
| 42 | + |
| 43 | +Other additions: |
| 44 | + |
| 45 | + * [#1446](https://github.com/typelevel/cats/pull/1446): `Cofree` comonad |
| 46 | + * [#1520](https://github.com/typelevel/cats/pull/1520) and [#1522](https://github.com/typelevel/cats/pull/1522): `intercalate` for `Foldable` (and `intercalate1` for `Reducible`) |
| 47 | + * [#1454](https://github.com/typelevel/cats/pull/1454): `asLeft` and `asRight` syntax methods for creating `Either` values |
| 48 | + * [#1468](https://github.com/typelevel/cats/pull/1468): `tupleLeft` and `tupleRight` for `Functor` |
| 49 | + * [#1500](https://github.com/typelevel/cats/pull/1500): `putLeft`, `putRight`, `mergeLeft`, and `mergeRight` methods for `Ior` |
| 50 | + * [#1495](https://github.com/typelevel/cats/pull/1495): `show` string interpolator |
| 51 | + * [#1448](https://github.com/typelevel/cats/pull/1448): `Validated#findValid` (like `orElse` but error accumulating) |
| 52 | + * [#1455](https://github.com/typelevel/cats/pull/1455): `reverse` for `NonEmptyList` |
| 53 | + * [#1517](https://github.com/typelevel/cats/pull/1517): `zipWithIndex` for `NonEmptyList` |
| 54 | + * [#1512](https://github.com/typelevel/cats/pull/1512) and [#1514](https://github.com/typelevel/cats/pull/1514): `filterNot` for `NonEmptyList` and `NonEmptyVector` |
| 55 | + * [#1480](https://github.com/typelevel/cats/pull/1480): `FunctionK#and` |
| 56 | + * [#1481](https://github.com/typelevel/cats/pull/1481): `EitherT.cond` |
| 57 | + |
| 58 | +Miscellaneous improvements (syntax, documentation, tests): |
| 59 | + |
| 60 | + * [#1513](https://github.com/typelevel/cats/pull/1513): Improved documentation for `Functor`, `Applicative`, and `Traverse` |
| 61 | + * [#1440](https://github.com/typelevel/cats/pull/1440): Improved type class documentation |
| 62 | + * [#1442](https://github.com/typelevel/cats/pull/1442): Improved documentation for `Semigroup` and `Monoid` |
| 63 | + * [#1479](https://github.com/typelevel/cats/pull/1479): Some instance traits are now package-private |
| 64 | + * [#1445](https://github.com/typelevel/cats/pull/1445): Workaround for Tut issue |
| 65 | + * [#1477](https://github.com/typelevel/cats/pull/1477): Use new kind-projector syntax for polymorphic lambdas |
| 66 | + * [#1483](https://github.com/typelevel/cats/pull/1483): Binary compatibility checking is now part of the build for cats-kernel |
| 67 | + * [#1469](https://github.com/typelevel/cats/pull/1469): More consistent instance names |
| 68 | + * [#1496](https://github.com/typelevel/cats/pull/1496): Simpler creation of some `SemigroupK` and `MonoidK` instances |
| 69 | + * [#1490](https://github.com/typelevel/cats/pull/1490): Avoid some duplication in build via sbt-travisci |
| 70 | + * [#1497](https://github.com/typelevel/cats/pull/1497): Site list clean-up |
| 71 | + |
| 72 | +And version updates: |
| 73 | + |
| 74 | + * [#1499](https://github.com/typelevel/cats/pull/1499): 2.12 version is now 2.12.1 |
| 75 | + * [#1509](https://github.com/typelevel/cats/pull/1509): Scala.js version is 0.6.14 |
| 76 | + |
| 77 | +As always thanks to everyone who filed issues, participated in the Cats Gitter |
| 78 | +channel, submitted code, or helped review pull requests. |
| 79 | + |
1 | 80 | ## Version 0.8.1 |
2 | 81 |
|
3 | 82 | > 2016 November 9 |
|
0 commit comments