From a69f9dd3ba31205d895f3763452662afde449c06 Mon Sep 17 00:00:00 2001 From: "Frank S. Thomas" Date: Sun, 19 Jun 2016 19:04:02 +0200 Subject: [PATCH] typeclass -> type class As agreed upon in #441. --- CHANGES.md | 2 +- core/src/main/scala/cats/TransLift.scala | 4 ++-- core/src/main/scala/cats/Trivial.scala | 4 ++-- docs/src/main/tut/contravariant.md | 2 +- docs/src/main/tut/faq.md | 2 +- docs/src/main/tut/invariant.md | 2 +- docs/src/main/tut/symbols.md | 4 ++-- docs/src/site/_layouts/default.html | 2 +- docs/src/site/typeclasses.md | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a8fa5d7cda..606777f024 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -69,7 +69,7 @@ This release includes some API changes: And additions: -* [#853](https://github.com/typelevel/cats/pull/853): Adds a new `LiftTrans` typeclass +* [#853](https://github.com/typelevel/cats/pull/853): Adds a new `LiftTrans` type class * [#864](https://github.com/typelevel/cats/pull/864): Add `Bifoldable` * [#875](https://github.com/typelevel/cats/pull/875): Add `.get` method to `StateT` * [#884](https://github.com/typelevel/cats/pull/884): Add `Applicative` syntax diff --git a/core/src/main/scala/cats/TransLift.scala b/core/src/main/scala/cats/TransLift.scala index 7901c55925..e8addcb745 100644 --- a/core/src/main/scala/cats/TransLift.scala +++ b/core/src/main/scala/cats/TransLift.scala @@ -2,13 +2,13 @@ package cats /** - * A typeclass which abstracts over the ability to lift an M[A] into a + * A type class which abstracts over the ability to lift an M[A] into a * MonadTransformer */ trait TransLift[MT[_[_], _]] { /** - * The typeclass which constrains liftT as a function of the type + * The type class which constrains liftT as a function of the type * constructor it is given. A safe "identity" value for this type * if your transformer does not constrain its lifted effects would * be `type TC[M[_]] = Trivial`. A more common constraint might be diff --git a/core/src/main/scala/cats/Trivial.scala b/core/src/main/scala/cats/Trivial.scala index 1f8ed629c9..2a8ff9200a 100644 --- a/core/src/main/scala/cats/Trivial.scala +++ b/core/src/main/scala/cats/Trivial.scala @@ -1,11 +1,11 @@ package cats /** - * The "Unit typeclass". The only instance of `Trivial` is given by + * The "Unit type class". The only instance of `Trivial` is given by * `Trivial.manifest`, and this instance is guaranteed to be in the * implicit scope. Several convenience type aliases are provided in * companion object, covering a few common use cases and avoiding the - * need for unnecessary lambdas (e.g. if you want a trivial typeclass + * need for unnecessary lambdas (e.g. if you want a trivial type class * instance for a type constructor, you should use `Trivial.PH1`). */ sealed trait Trivial diff --git a/docs/src/main/tut/contravariant.md b/docs/src/main/tut/contravariant.md index 17005131e7..b121276a3a 100644 --- a/docs/src/main/tut/contravariant.md +++ b/docs/src/main/tut/contravariant.md @@ -51,7 +51,7 @@ Salary(Money(1000)).show `Show` example is trivial and quite far-fetched, let's see how `Contravariant` can help with orderings. -`scala.math.Ordering` typeclass defines comparison operations, e.g. `compare`: +`scala.math.Ordering` type class defines comparison operations, e.g. `compare`: ```tut:book Ordering.Int.compare(2, 1) diff --git a/docs/src/main/tut/faq.md b/docs/src/main/tut/faq.md index 188e011572..c8722df3a0 100644 --- a/docs/src/main/tut/faq.md +++ b/docs/src/main/tut/faq.md @@ -15,7 +15,7 @@ import cats.data._ import cats.implicits._ ``` -The `cats._` import brings in quite a few [typeclasses](http://typelevel.org/cats/typeclasses.html) (similar to interfaces) such as [Monad](http://typelevel.org/cats/tut/monad.html), [Semigroup](http://typelevel.org/cats/tut/semigroup.html), and [Foldable](http://typelevel.org/cats/tut/foldable.html). Instead of the entire `cats` package, you can import only the types that you need, for example: +The `cats._` import brings in quite a few [type classes](http://typelevel.org/cats/typeclasses.html) (similar to interfaces) such as [Monad](http://typelevel.org/cats/tut/monad.html), [Semigroup](http://typelevel.org/cats/tut/semigroup.html), and [Foldable](http://typelevel.org/cats/tut/foldable.html). Instead of the entire `cats` package, you can import only the types that you need, for example: ```tut:silent import cats.Monad diff --git a/docs/src/main/tut/invariant.md b/docs/src/main/tut/invariant.md index 371a50350a..849c84a3ec 100644 --- a/docs/src/main/tut/invariant.md +++ b/docs/src/main/tut/invariant.md @@ -30,7 +30,7 @@ timestamp. Let's say that we want to create a `Semigroup[Date]`, by ### Semigroup does not form a covariant functor If `Semigroup` had an instance for the standard covariant [`Functor`](functor.html) -typeclass, we could use `map` to apply a function `longToDate`: +type class, we could use `map` to apply a function `longToDate`: ```tut:silent import java.util.Date diff --git a/docs/src/main/tut/symbols.md b/docs/src/main/tut/symbols.md index 000f800d2a..dc84bf5792 100644 --- a/docs/src/main/tut/symbols.md +++ b/docs/src/main/tut/symbols.md @@ -8,7 +8,7 @@ All other symbols can be imported with `import cats.implicits._` A scaladoc generated list is also available on the [Scaladoc symbols page](http://typelevel.org/cats/api/#index.index-_). -| Symbol | Name | Typeclass | Definition | +| Symbol | Name | Type Class | Definition | | ---------- | ---------------------- | ---------------------------------------------------------------------------------------- |--------------------------------------- | | `fa |@| fb`| Cartesian builder | [`Cartesian[F[_]]`]({{ site.sources }}/core/src/main/scala/cats/Cartesian.scala) | `|@|(fa: F[A])(fb: F[B]): F[(A, B)]` | | `fa *> fb` | right apply | [`Cartesian[F[_]]`]({{ site.sources }}/core/src/main/scala/cats/Cartesian.scala) | `*>(fa: F[A])(fb: F[B]): F[A]` | @@ -28,4 +28,4 @@ A scaladoc generated list is also available on the [Scaladoc symbols page](http: | `F :<: G` | inject | [`Inject[F[_], G[_]]`]({{ site.sources }}/free/src/main/scala/cats/free/package.scala) | `Inject` alias | | `F :≺: G` | inject | [`Inject[F[_], G[_]]`]({{ site.sources }}/free/src/main/scala/cats/free/package.scala) | `Inject` alias | | `⊥` | bottom | [N/A]({{ site.sources }}/core/src/main/scala/cats/package.scala) | `Nothing` | -| `⊤` | top | [N/A]({{ site.sources }}/core/src/main/scala/cats/package.scala) | `Any` | \ No newline at end of file +| `⊤` | top | [N/A]({{ site.sources }}/core/src/main/scala/cats/package.scala) | `Any` | diff --git a/docs/src/site/_layouts/default.html b/docs/src/site/_layouts/default.html index f74e423785..332a901ba8 100644 --- a/docs/src/site/_layouts/default.html +++ b/docs/src/site/_layouts/default.html @@ -41,7 +41,7 @@

Cats

About
  • - Typeclasses + Type Classes
  • Data Types diff --git a/docs/src/site/typeclasses.md b/docs/src/site/typeclasses.md index 34a08d492e..139216b895 100644 --- a/docs/src/site/typeclasses.md +++ b/docs/src/site/typeclasses.md @@ -1,6 +1,6 @@ --- layout: default -title: "Typeclasses" +title: "Type Classes" section: "typeclasses" --- {% include_relative _tut/typeclasses.md %}