- May 25 2020 Cats 2.2.0-M2 is released
- Mar 31 2020 Cats 2.2.0-M1 is released
- Dec 18 2019 Cats 2.1.0 is released
- Dec 11 2019 Cats 2.1.0-RC3 is released
- Nov 26 2019 Cats 2.1.0-RC2 is released
- Nov 15 2019 Cats 2.1.0-RC1 is released
- Sep 9 2019 Cats 2.0.0 is released
- Sep 7 2019 Cats 2.0.0-RC3 is released
- Aug 26 2019 Cats 2.0.0-RC2 is released
- Aug 2 2019 Cats 2.0.0-RC1 is released
- Jun 11 2019 Cats 2.0.0-M4 is released with support for Scala 2.13
- Jun 3 2019 Cats 1.6.1 is released with backported bug fixes
- Jun 1 2019 Cats 2.0.0-M3 is released with support for Scala 2.13.0-RC3
- May 25 2019 Cats 2.0.0-M2 is released with support for Scala 2.13.0-RC2
- Apr 26 2019 We launched a sustainability program. Please consider supporting us.
- Apr 25 2019 Cats 2.0.0-M1 is released with binary compatibility with 1.x on
cats-kernel
,cats-core
andcats-free
- Feb 15 2019 Cats 2019 roadmap is published.
Cats is a library which provides abstractions for functional programming in the Scala programming language. The name is a playful shortening of the word category.
Scala supports both object-oriented and functional programming, and this is reflected in the hybrid approach of the standard library. Cats strives to provide functional programming abstractions that are core, binary compatible, modular, approachable and efficient. A broader goal of Cats is to provide a foundation for an ecosystem of pure, typeful libraries to support functional programming in Scala applications.
For more detail about Cats' motivations, go here.
This project exists thanks to all the people who contribute. We welcome contributions to Cats and would love for you to help build Cats. See our contributor guide for more information about how you can get involved as a developer. If you are looking for something to start with, here is a beginner friendly list.
Become a financial contributor and help us sustain our community. Donations directly support office hour for maintainers, better documentation and strategic initiatives.
Gold Sponsors are those who have pledged $5,000 to $10,000.
Silver Sponsors are those who have pledged $2,000 to $5,000.
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
Cats is currently available for Scala 2.10 (up to 1.2.x), 2.11, 2.12, 2.13, and Scala.js.
Cats relies on improved type inference via the fix for SI-2712, which is not enabled by default. For Scala 2.11.9+ or 2.12 you should add the following to your build.sbt
:
scalacOptions += "-Ypartial-unification"
(Partial unification is on by default since Scala 2.13, the compiler no longer accepts -Ypartial-unification
)
Or, if you need to support older versions of Scala you can use the sbt-partial-unification plugin which extends support back through Scala 2.10.6 or later, to add it, simply add this line to your plugins.sbt
:
addSbtPlugin("org.lyranthe.sbt" % "partial-unification" % "1.1.2")
And then create the Cats dependency, by adding the following to your build.sbt
:
libraryDependencies += "org.typelevel" %% "cats-core" % "2.1.1"
This will pull in the cats-core module. If you require some other
functionality, you can pick-and-choose from amongst these modules
(used in place of "cats-core"
):
cats-kernel
: Small set of basic type classes (required).cats-core
: Most core type classes and functionality (required).cats-laws
: Laws for testing type class instances.cats-free
: Free structures such as the free monad, and supporting type classes.cats-testkit
: lib for writing tests for type class instances using laws.alleycats-core
: Cats instances and classes which are not lawful.
There are several other Cats modules that are in separate repos so that they can maintain independent release cycles.
cats-effect
: standardIO
type together withSync
,Async
andEffect
type classescats-mtl
: transformer typeclasses for Cats' Monads, Applicatives and Functors.mouse
: a small companion to Cats that provides convenient syntax (aka extension methods)kittens
: automatic type class instance derivation for Cats and generic utility functionscats-tagless
: Utilities for tagless final encoded algebrascats-collections
: Data structures which facilitate pure functional programmingcats-testkit-scalatest
: Cats testkit integration with Scalatest
Past release notes for Cats are available in CHANGES.md. See Cats 2019 roadmap for our plan for 2019.
Links:
- Website: typelevel.org/cats/
- ScalaDoc: typelevel.org/cats/api/
- Type classes: typelevel.org/cats/typeclasses
- Data types: typelevel.org/cats/datatypes.html
- Glossary: typelevel.org/cats/nomenclature.html
- Resources for Learners: typelevel.org/cats/resources_for_learners.html
- FAQ: typelevel.org/cats/faq.html
By sharing the same set of type classes, instances and data types provided by Cats, projects can speak the same "Cats language", and integrate with each other with ease.
- cats-par: Abstract type member Parallel instances
- cats-retry: composable retry logic for Cats and Cats Effect
- droste: recursion schemes for Cats
- dsl-domains-cats: The
!
-notation for creating Cats monadic expressions - eff: functional effects and effect handlers (alternative to monad transformers)
- Freestyle: pure functional framework for Free and Tagless Final apps & libs
- iota: Fast [co]product types with a clean syntax
- Monocle: an optics library for Scala (and Scala.js) strongly inspired by Haskell Lens.
- newts: Defines newtypes compatible with Cats type classes
- origami: monadic folds
- refined: simple refinement types for Scala
- shims: seamless interoperability for Cats and scalaz typeclasses and datatypes
- atto: friendly little text parsers
- cats-scalacheck: Cats typeclass instances for ScalaCheck
- cats-time: cats typeclass instances for java time
- circe: pure functional JSON library
- Ciris: Lightweight, extensible, and validated configuration loading in Scala
- cormorant: CSV handling library for FP
- decline: A composable command-line parser
- doobie: a pure functional JDBC layer for Scala
- extruder: Populate case classes from any data source
- fastparse-cats: cats Monad and Alternative instances for fastparse
- Fetch: efficient data access to heterogeneous data sources
- finch: Scala combinator library for building Finagle HTTP services
- Frameless: Expressive types for Spark
- FS2: compositional, streaming I/O library
- fuuid: functional uuid's
- github4s: wrapper around the GitHub API
- grafter: dependency-injection library using the
Reader
pattern - gsheets4s: wrapper around the Google Sheets API
- hammock: Purely functional HTTP client
- henkan: Type safe conversion between case class instances with similar fields
- http4s: A minimal, idiomatic Scala interface for HTTP
- itto-csv: pure functional library for working with CSV
- linebacker: functional thread pool management
- log4cats: functional logging
- monadic-html: Tiny DOM binding library for Scala.js
- Monix: high-performance library for composing asynchronous and event-based programs
- morphling: free applicative schemas & instance derivation
- phony: Fake data generator
- pureconfig: A boilerplate-free library for loading configuration files
- rainier: Bayesian inference in Scala
- scala-forex: exchange rate lookups
- scala-maxmind-ip-lookups: IP geolocation through the Maxmind database
- scala-referer-parser: referer parsing
- scala-rl: Functional, monadic reinforcement learning in Scala
- scala-weather: weather lookups
- scanamo: simpler DynamoDB access for Scala
- seals: tools for schema evolution and language-integrated schemata
- sup: Composable, purely functional healthchecks in Scala
- tsec: Typesafe, functional, general purpose cryptography and security library
Your project talks Cats too? Submit a PR to add it here!
The full-size Cats logo is available for use for Cats related projects, contents, souvenirs, etc.
We offer a Cats Friendly Badge to let others know your project works with Cats!
Below are quick html and markdown snippets to use the badge in your own project.
<a href="https://typelevel.org/cats/"><img src="https://typelevel.org/cats/img/cats-badge-tiny.png" alt="Cats friendly" /></a>
![Cats Friendly Badge](https://typelevel.org/cats/img/cats-badge-tiny.png)
Discussion around Cats is currently happening on Github issue and PR pages as well as in two Gitter channels:
Gitter channel cats is for general user questions and discussions, and
Gitter channel cats-dev is dedicated for Cats development related discussions. For people who wants to follow closely and/or to participate in the decisions in Cats development, this is the room to join.
People are expected to follow the Scala Code of Conduct when discussing Cats on the Github page, Gitter channel, or other venues.
We hope that our community will be respectful, helpful, and kind. If you find yourself embroiled in a situation that becomes heated, or that fails to live up to our expectations, you should disengage and contact one of the project maintainers in private. We hope to avoid letting minor aggressions and misunderstandings escalate into larger problems.
If you are being harassed, please contact one of us immediately so that we can support you.
After 1.0.0
release, we decided
to use MAJOR.MINOR.PATCH Semantic Versioning 2.0.0
going forward, which is different from the EPOCH.MAJOR.MINOR scheme common among
Java and Scala libraries (including the Scala lang).
Cats strives to provide a solid and stable foundation for an ecosystem of
FP libraries. Thus, we treat backward binary compatibility maintenance with a high priority.
In semantic versioning, backward breaking change is ONLY allowed between MAJOR versions.
We will maintain backward binary compatibility between PATCH AND MINOR versions.
For example, when we release Cats 1.1.0
, it will be backward binary compatible
with the previous 1.0.x
versions. I.E. the new JAR will be a drop-in replacement for
the old one. This is critical when your application has a diamond
dependency on Cats - depending on two or more libraries that all depend on Cats.
If one library upgrades to the new 1.1.0
Cats before the other one does, your
application still runs thanks to this backward binary compatibility.
Also worth noting is that according to semantic versioning, MINOR version Y (x.Y.z | x > 0) MUST be incremented if new, backwards compatible functionality is introduced to the public API. It MUST be incremented if any public API functionality is marked as deprecated.
Any binary breaking changes will require a MAJOR version bump, which we will be very
cautious about. We will also consider using organization
and package name for major
versioning in the future. But that decision is yet to be made.
Here's a (non-exhaustive) list of companies that use Cats in production. Don't see yours? You can add it in a PR!. And if you can, consider supporting us.
- Abacus Protocol
- Anduin Transactions
- Apple Inc. (FEAR team)
- AutoScout24
- Avast
- BabylonHealth
- Banno Group inside of Jack Henry & Associates
- Basefarm
- buildo
- Chartboost
- Codacy
- Codecentric
- Colisweb
- Coya
- Datum Brain
- DriveTribe
- Dwolla
- Earnest
- eBay Inc.
- Eloquentix
- eSailors
- Evolution Gaming
- Evotor Marketplace
- e.near
- E.ON
- formation.ai
- Free2Move
- HelloSoda
- HomeAway
- iHeartRadio
- ImmobilienScout24
- ITV
- Lightform
- Lookout
- Merit
- Metacommerce
- MYOB
- Netflix
- Nezasa
- NCR Edinburgh
- Ocado Technology
- Packlink
- Permutive
- Raiffeisenbank Russia
- Rakuten
- REA Group
- Reality Games
- RBC Capital Markets
- Rudder
- Scalac
- Scala Center
- Snowplow Analytics
- Spiceworks
- Spotahome
- Spotify
- SpringerNature
- SRF
- Stripe
- Tecsisa
- Teikametrics
- The Guardian
- Underscore Consulting
- Waves Platform
- Wegtam GmbH
- WeWork
- Wix.com
- Zalando
- 47 Degrees
The current maintainers (people who can merge pull requests) are:
- ceedubs Cody Allen
- rossabaker Ross Baker
- johnynek P. Oscar Boykin
- travisbrown Travis Brown
- adelbertc Adelbert Chang
- LukaJCB Luka Jacobowitz
- peterneyens Peter Neyens
- tpolecat Rob Norris
- non Erik Osheim
- mpilquist Michael Pilquist
- milessabin Miles Sabin
- djspiewak Daniel Spiewak
- fthomas Frank Thomas
- julien-truffaut Julien Truffaut
- kailuowang Kailuo Wang
We are currently following a practice of requiring at least two sign-offs to merge code PRs (and for large or contentious issues we may wait for more). For typos, documentation improvements or minor build fix we relax this to a single sign-off. More detail in the process document.
All code is available to you under the MIT license, available at http://opensource.org/licenses/mit-license.php and also in the COPYING file. The design is informed by many other projects, in particular Scalaz.
Copyright the maintainers, 2015-2019.