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

Update kind-projector and simulacrum url #3226

Merged
merged 1 commit into from
Dec 25, 2019
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ ensure correctness.

Cats will be designed to use modern *best practices*:

* [simulacrum](https://github.com/mpilquist/simulacrum) for minimizing type class boilerplate
* [simulacrum](https://github.com/typelevel/simulacrum) for minimizing type class boilerplate
* [machinist](https://github.com/typelevel/machinist) for optimizing implicit operators
* [scalacheck](http://scalacheck.org) for property-based testing
* [discipline](https://github.com/typelevel/discipline) for encoding and testing laws
* [kind-projector](https://github.com/non/kind-projector) for type lambda syntax
* [kind-projector](https://github.com/typelevel/kind-projector) for type lambda syntax
* [algebra](https://github.com/non/algebra) for shared algebraic structures
* ...and of course a pure functional subset of the Scala language.

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/arrow/FunctionK.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import cats.data.{EitherK, Tuple2K}
* in the same manner that function `A => B` is a morphism from values
* of type `A` to `B`.
* An easy way to create a FunctionK instance is to use the Polymorphic
* lambdas provided by non/kind-projector v0.9+. E.g.
* lambdas provided by typelevel/kind-projector v0.9+. E.g.
* {{{
* val listToOption = λ[FunctionK[List, Option]](_.headOption)
* }}}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/tut/colophon.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ We would like to thank the maintainers of these supporting projects,
and we'd encourage you to check out these projects and consider
integrating them into your own projects.

* [simulacrum](https://github.com/mpilquist/simulacrum) for minimizing type class boilerplate
* [simulacrum](https://github.com/typelevel/simulacrum) for minimizing type class boilerplate
* [machinist](https://github.com/typelevel/machinist) for optimizing implicit operators
* [scalacheck](http://scalacheck.org) for property-based testing
* [discipline](https://github.com/typelevel/discipline) for encoding and testing laws
* [kind-projector](https://github.com/non/kind-projector) for type lambda syntax
* [kind-projector](https://github.com/typelevel/kind-projector) for type lambda syntax
* [tut](https://github.com/tpolecat/tut) type-checked example code makes sure that our examples stay in sync with the rest of our source

There are other libraries that aim to foster Functional Programming in the Scala programming language which Cats has a relationship to:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/datatypes/const.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ is to take an `A` and return it right back (lifted into `Const`).
Before we plug and play however, note that `modifyF` has a `Functor` constraint on `F[_]`. This means we need to
define a `Functor` instance for `Const`, where the first type parameter is fixed.

*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/non/kind-projector) and will not compile if it is not being used in a project.
*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/typelevel/kind-projector) and will not compile if it is not being used in a project.

```tut:silent
import cats.data.Const
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/datatypes/either.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Because `Either` is right-biased, it is possible to define a `Monad` instance fo
Since we only ever want the computation to continue in the case of `Right`, we fix the left type parameter
and leave the right one free.

*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/non/kind-projector) and will not compile if it is not being used in a project.
*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/typelevel/kind-projector) and will not compile if it is not being used in a project.

```tut:silent
import cats.Monad
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/tut/datatypes/functionk.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ val first: FunctionK[List, Option] = new FunctionK[List, Option] {

## Syntactic Sugar

If the example above looks a bit too verbose for you, the [kind-projector](https://github.com/non/kind-projector)
compiler plugin [provides](https://github.com/non/kind-projector#polymorphic-lambda-values) a more concise syntax.
If the example above looks a bit too verbose for you, the [kind-projector](https://github.com/typelevel/kind-projector)
compiler plugin [provides](https://github.com/typelevel/kind-projector#polymorphic-lambda-values) a more concise syntax.
After adding the plugin to your project, you could write the `first` example as:

```tut:silent
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/datatypes/kleisli.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ resolution will pick up the most specific instance it can (depending on the `F[_

An example of a `Monad` instance for `Kleisli` is shown below.

*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/non/kind-projector) and will not compile if it is not being used in a project.
*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/typelevel/kind-projector) and will not compile if it is not being used in a project.

```tut:silent
import cats.implicits._
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/datatypes/validated.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ Which can be defined in terms of `Apply#ap` and `Apply#map`, the very functions

Can we perhaps define an `Apply` instance for `Validated`? Better yet, can we define an `Applicative` instance?

*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/non/kind-projector) and will not compile if it is not being used in a project.
*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/typelevel/kind-projector) and will not compile if it is not being used in a project.

```tut:silent
import cats.Applicative
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/tut/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Cats used to provide mitigation to this issue semi-transparently, but given the

## <a id="example-compile" href="#example-compile"></a>Why is some example code not compiling for me?

A portion of example code requires either the [Kind-projector](https://github.com/non/kind-projector) compiler plugin or partial unification turned on in scalac. The easiest way to turn partial unification on is through this [sbt plugin](https://github.com/fiadliel/sbt-partial-unification).
A portion of example code requires either the [Kind-projector](https://github.com/typelevel/kind-projector) compiler plugin or partial unification turned on in scalac. The easiest way to turn partial unification on is through this [sbt plugin](https://github.com/fiadliel/sbt-partial-unification).

## <a id="future-instances" href="#future-instances"></a>Why can't the compiler find implicit instances for Future?

Expand Down Expand Up @@ -142,7 +142,7 @@ It may be worth keeping in mind that `IO` and `Task` are pretty blunt instrument

## <a id="simulacrum" href="#simulacrum"></a>What does `@typeclass` mean?

Cats defines and implements numerous type classes. Unfortunately, encoding these type classes in Scala can incur a large amount of boilerplate. To address this, [Simulacrum](https://github.com/mpilquist/simulacrum) introduces `@typeclass`, a macro annotation which generates a lot of this boilerplate. This elevates type classes to a first class construct and increases the legibility and maintainability of the code. Use of simulacrum also ensures consistency in how the type classes are encoded across a project. Cats uses simulacrum wherever possible to encode type classes, and you can read more about it at the [project page](https://github.com/mpilquist/simulacrum).
Cats defines and implements numerous type classes. Unfortunately, encoding these type classes in Scala can incur a large amount of boilerplate. To address this, [Simulacrum](https://github.com/typelevel/simulacrum) introduces `@typeclass`, a macro annotation which generates a lot of this boilerplate. This elevates type classes to a first class construct and increases the legibility and maintainability of the code. Use of simulacrum also ensures consistency in how the type classes are encoded across a project. Cats uses simulacrum wherever possible to encode type classes, and you can read more about it at the [project page](https://github.com/typelevel/simulacrum).

Note that the one area where simulacrum is intentionally not used is in the `cats-kernel` module. The `cats-kernel` module is intended to be a shared dependency for a number of projects, and as such, it is important that it is both lightweight and very stable from a binary compatibility perspective. At some point there may be a transition from simulacrum to [typeclassic](https://github.com/typelevel/typeclassic), and the binary compatibility of moving between simulacrum and typeclassic is unclear at this point. Avoiding the dependency on simulacrum in `cats-kernel`, provides insulation against any potential binary compatibility problems in such a transition.

Expand All @@ -152,7 +152,7 @@ Cats defines a wealth of type classes and type class instances. For a number of

**Enter type lambdas!** Type lambdas provide a mechanism to allow one or more of the type parameters for a particular type constructor to be fixed. In the case of `Either` then, when defining a `Monad` for `Either`, we want to fix one of the type parameters at the point where a `Monad` instance is summoned, so that the type parameters line up. As `Either` is right biased, a type lambda can be used to fix the left type parameter and allow the right type parameter to continue to vary when `Either` is treated as a `Monad`. The right biased nature of `Either` is discussed further in the [`Either` documentation]({{ site.baseurl }}/datatypes/either.html).

**Enter [kind-projector](https://github.com/non/kind-projector)!** kind-projector is a compiler plugin which provides a convenient syntax for dealing with type lambdas. The symbols `?` and `λ` are treated specially by kind-projector, and expanded into the more verbose definitions that would be required were it not to be used. You can read more about kind-projector at the [project page](https://github.com/non/kind-projector).
**Enter [kind-projector](https://github.com/typelevel/kind-projector)!** kind-projector is a compiler plugin which provides a convenient syntax for dealing with type lambdas. The symbols `?` and `λ` are treated specially by kind-projector, and expanded into the more verbose definitions that would be required were it not to be used. You can read more about kind-projector at the [project page](https://github.com/typelevel/kind-projector).

## <a id="tailrecm" href="#tailrecm"></a>What is `tailRecM`?

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/typeclasses/monad.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ instructions on how to compose any outer monad (`F` in the following
example) with a specific inner monad (`Option` in the following
example).

*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/non/kind-projector) and will not compile if it is not being used in a project.
*Note*: the example below assumes usage of the [kind-projector compiler plugin](https://github.com/typelevel/kind-projector) and will not compile if it is not being used in a project.

```tut:silent
case class OptionT[F[_], A](value: F[Option[A]])
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/typeclasses/typeclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ Originally from [@alexknvl](https://gist.github.com/alexknvl/d63508ddb6a728015ac


[fbounds]: http://tpolecat.github.io/2015/04/29/f-bounds.html "Returning the "Current" Type in Scala"
[simulacrum]: https://github.com/mpilquist/simulacrum "First class syntax support for type classes in Scala"
[simulacrum]: https://github.com/typelevel/simulacrum "First class syntax support for type classes in Scala"