Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give higher priority to partial-unification fix #1946

Merged
merged 2 commits into from
Oct 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,22 @@ For more detail about Cats' motivations, go [here](http://typelevel.org/cats/mot

Cats is currently available for Scala 2.10, 2.11 and 2.12, and [Scala.js](http://www.scala-js.org/).

To get started with SBT, simply add the following to your `build.sbt`
file:

Cats relies on improved type inference via the fix for [SI-2112](https://issues.scala-lang.org/browse/SI-2712), which is not enabled by default. For **Scala 2.11.9 or later** you should add the following to your `build.sbt`:

```scala
scalacOptions += "-Ypartial-unification"

libraryDependencies += "org.typelevel" %% "cats-core" % "1.0.0-MF"
```

**Or**, if you need to support older versions of Scala you can use the [sbt-partial-unification](/~https://github.com/fiadliel/sbt-partial-unification#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`:

```scala
addSbtPlugin("org.lyranthe.sbt" % "partial-unification" % "1.1.0")
```

And then create the cats dependency, by adding the following to your `build.sbt`:

```scala
libraryDependencies += "org.typelevel" %% "cats-core" % "1.0.0-MF"
Expand All @@ -49,9 +63,6 @@ functionality, you can pick-and-choose from amongst these modules
* [`alleycats`](/~https://github.com/non/alleycats): cats instances and classes which are not lawful.
* [`mouse`](/~https://github.com/benhutchison/mouse): a small companion to cats that provides convenient syntax (aka extension methods)

#### Enhancing type inference

To use cats you'll need sometimes support for improved type inference. To enable it for any supported Scalac version, use this [sbt plugin](/~https://github.com/fiadliel/sbt-partial-unification#sbt-partial-unification).

Release notes for Cats are available in [CHANGES.md](/~https://github.com/typelevel/cats/blob/master/CHANGES.md).

Expand Down