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"
, usecats-core
,cats-free
, orcats-law
accordingly instead. If you needcats.free
, use"org.typelevel" % "cats-free"
, if you needcats-laws
use"org.typelevel" % "cats-laws"
, if neither, use"org.typelevel" % "cats-core"
.cats.free.Inject
is moved fromcats-free
tocats-core
and renamed tocats.InjectK
;cats.data.Prod
is renamed tocats.data.Tuple2K
;cats.data.Coproduct
is renamed tocats.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
andTraverseFilter
are no longer incats
, the functionalities they provided are inherited by the new cats-mtl project. Please check here for migration guide. -
MonadCombine
is no longer in cats. UseAlternative
orMonad
+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 fromcats.syntax.tuple._
tocats.syntax.apply._
and renamed tomapN
,contramapN
andimapN
respectively. - The creation methods (
left
,right
,apply
,pure
, etc.) inEitherT
were improved to take less type arguments. - Several
cats-core
type class instances forcats.kernel
were moved from their companion objects to separate traits and thus require imports fromcats.instances.xxx._
(or the recommendedimport cats.implicits._
) now. See #1659 for more details. Free.suspend
is renamed toFree.defer
for consistency.traverse1_
,intercalate1
andsequence1_
inReducible
were renamed tononEmptyTraverse_
,nonEmptyIntercalate
andnonEmptySequence_
respectively.foldLeftM
is removed fromFree
, usefoldM
onFoldable
instead, see #1117 for detail.iteratorFoldM
was removed fromFoldable
due to #1716Split
is removed, and the methodsplit
is moved toArrow
. Note that only underCommutativeArrow
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 forEitherT
. by @kailuowang - #1596: Rename
Inject
toInjectK
. by @andyscott - #1589: Rename
Prod
,Coproduct
toTuple2K
andEitherK
. 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
todefer
. by @peterneyens - #1611: Renamed
traverse1_
,intercalate1
andsequence1_
inReducible
. by @LukaJCB - #1117:
foldLeftM
withoutFree
. 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
withCommutativeArrow
, introducesCommutativeMonad
. 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:
by @wedensMonadTrans
instance for RWST and makeMonadTrans
serializable. - #1658: Add
Validated.validNel
. by @edmundnoble - #1651:
Add state method toby @oskoiMonadState
. - #1628: add init and size methods to
NonEmptyList
. by @jtjeferreira - #1612: Add ensureWith to
Validated
andEither
(#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
toallInstances
. by @kailuowang - #1586: Add
Applicative.unit
. by @alexandru - #1584: Move arbitrary instance of
StateT
to laws. by @kailuowang - #1580: add
groupBy
toNonEmptyList
andgroupByNel
toList
syntax @julien-truffaut - #1578: add
last
,sortBy
andsorted
toNonEmptyList
. by @julien-truffaut - #1571: added
whileM
,untilM
,iterateWhile
, etc toMonad
. by @tpolecat & @kailuowang - #1548:
MonadError
instance forIor
. by @leandrob13 - #1543:
MonadError
instance forKleisli
. 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
forFoldable
. 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
forEither
. by @andyscott - #1746: Add
EitherNel
type alias forEither[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 forshow
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
andadaptError
toApplicativeError
/MonadError
. by @SystemFw - #1644: Add
MonadError
instance forEitherT
that recovers fromF[_]
errors. by @leandrob13 - #1748: Stack-safe
FreeAppplicative
. by @edmundnoble - #1516: Implement
NonEmptyList#Collect
. by @xavier-fernandez
- #1761: Add index related helpers to
Code improvements:
- #1660: Override
fromTry
andfromEither
forTry
andEither
. by @peterneyens - #1642: Unseal
InjectK
to allow for extension by other libraries. by @andyscott - #1641: Make
InjectK
useFunctionK.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
extendShowSyntax
instead ofShow.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
andScalaTest
. 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
andApplicativeError
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
methodsUnit
,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