diff --git a/CHANGES.md b/CHANGES.md index 582fa47a43..fcf541f6cc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -107,7 +107,7 @@ Cats 2.0.0-M1 breaks binary compatibility on cats-laws, cats-kernel-laws, cats-t ### Breaking changes -* cats-laws and cats-kernel-laws now depend on Scalacheck 1.14.0 which is not binary compatible with Scalacheck 1.13. +* cats-laws and cats-kernel-laws now depend on ScalaCheck 1.14.0 which is not binary compatible with ScalaCheck 1.13. * cats-testkit now depends on Scalatest 3.1.0-SNAP9 whics is not backward compatible with Scalatest 3.0.x. * alleycats no longer supports export-hook. * [#2672](https://github.com/typelevel/cats/pull/2672) Alter from Reflexitivity to Reflexivity by @mattkohl @@ -780,7 +780,7 @@ This is the only planned release candidate release prior to 1.0.0. To migrate from 1.0.0-MF. -* The rename of `Cartesian` to `Semigroupal` and `EitherT.liftT` to `EitherT.liftF` can be done automatically through scalafix we provide. See instructions [here](https://github.com/typelevel/cats/blob/master/scalafix/README.md). +* The rename of `Cartesian` to `Semigroupal` and `EitherT.liftT` to `EitherT.liftF` can be done automatically through Scalafix we provide. See instructions [here](https://github.com/typelevel/cats/blob/master/scalafix/README.md). * For `FlatMap`'s `>>` and `<<`, use `Apply`'s `*>` and `<*` instead. * `Profunctor` and `Strong` were moved to the `cats.arrow` package, `Bifunctor`, `Invariant` and `Contravariant` were moved to the `cats` root package. * `SemigroupK[λ[α => Kleisli[F, α, α]]]` and `MonoidK[λ[α => Kleisli[F, α, α]]]` are no longer implicitly available, Use `Kleisli.endoSemigroupK` and `Kleisli.endoMonoidK` to get them explicitly. @@ -1631,7 +1631,7 @@ published under the `org.typelevel` group from the [Typelevel](https://github.com/typelevel) organization on GitHub (previous releases had been published to `org.spire-math` from `non/cats`). This means that users will need to change the `groupId` for their Cats dependencies when -updating. If you have a line like this in your SBT build configuration, for +updating. If you have a line like this in your `sbt` build configuration, for example: ```scala @@ -1981,7 +1981,7 @@ Version 0.2.0 is the second release of the Cats library. The most exciting feature of this release is Scala.js support, which comes courtesy of much hard work by the Scala.js community (especially -Alistair Johnson). The SBT build configuration and project layout were +Alistair Johnson). The `sbt` build configuration and project layout were updated to support building for both the JVM and JS platforms. Since the 0.1.2 release there was wide agreement that the split diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f03a9a7550..44342c526d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ skip these steps and jump straight to submitting a pull request. 7. [Write examples](#write-examples) 8. [Submit pull request](#submit-a-pull-request) -### Find something that belongs in cats +### Find something that belongs in Cats Looking for a way that you can help out? Check out our [open issues](https://github.com/typelevel/cats/issues) and look for ones tagged as _**help wanted**_ or _**low-hanging fruit**_. These issues are the easiest way to start contributing, but if you find other items that catch your eye, you're most than welcome to tackle them! @@ -41,14 +41,14 @@ Make sure that it's not already assigned to someone and that nobody has left a c working on and offer to collaborate.) Have an idea for something new? That's great! We recommend that you -make sure it belongs in cats before you put effort into creating a +make sure it belongs in Cats before you put effort into creating a pull request. The preferred ways to do that are to either: * [create a GitHub issue](https://github.com/typelevel/cats/issues/new) describing your idea. * get feedback in the [cats Gitter room](https://gitter.im/typelevel/cats). -Things that belong in cats generally have the following characteristics: +Things that belong in Cats generally have the following characteristics: * Their behavior is governed by well-defined [laws](https://typelevel.org/cats/typeclasses.html#laws). * They provide general abstractions. @@ -75,7 +75,7 @@ depends on Cats is probably the best plan. Cats has other _companion_ projects, described next: * [cats-effect](https://github.com/typelevel/cats-effect): a project aimed to provide a standard IO type for the Cats ecosystem, as well as a set of typeclasses (and associated laws) which characterize general effect types. -* [cats-mtl](https://github.com/typelevel/cats-mtl): provides transformer typeclasses for cats' Monads, Applicatives and Functors. +* [cats-mtl](https://github.com/typelevel/cats-mtl): provides transformer typeclasses for Cats' Monads, Applicatives and Functors. * [mouse](https://github.com/typelevel/mouse): a small companion to the Cats functional programming library for Scala. It includes convenience extension methods for Scala standard library classes, including some found in scalaz that are not in Cats. @@ -161,7 +161,7 @@ with [Discipline](https://github.com/typelevel/discipline) for law checking, and - It is also a goal that, for every combination of data type and supported type class instance: - Appropriate law checks for that combination are included to ensure that the instance meets the laws for that type class. - A serializability test for that combination is also included, such that we know that frameworks which - rely heavily on serialization, such as `Spark`, will have strong compatibility with `cats`. + rely heavily on serialization, such as `Spark`, will have strong compatibility with `Cats`. - Note that custom serialization tests are not required for instances of type classes which come from `algebra`, such as `Monoid`, because the `algebra` laws include a test for serialization. - For testing your laws, it is advised to check [this guide](https://typelevel.org/cats/typeclasses/lawtesting.html). @@ -285,7 +285,7 @@ immediately so that we can support you. ## Nix Cats Development Environment -Since Cats development can include the Scala runtime, the Scala.js runtime, the Cats website, and more; a number of dependencies (SBT, Node.js, Jekyll, etc) can be needed to work on Cats. Managing these dependencies globally can be a hassle and can lead to version conflicts. To make this easier to manage in an isolated development environment, Cats provides a `shell.nix` for anyone using the [Nix package manager](https://nixos.org/nix/). +Since Cats development can include the Scala runtime, the Scala.js runtime, the Cats website, and more; a number of dependencies (sbt, Node.js, Jekyll, etc) can be needed to work on Cats. Managing these dependencies globally can be a hassle and can lead to version conflicts. To make this easier to manage in an isolated development environment, Cats provides a `shell.nix` for anyone using the [Nix package manager](https://nixos.org/nix/). To use the Nix-based Cats development environment: diff --git a/PROCESS.md b/PROCESS.md index 112a02b02a..400accea5c 100644 --- a/PROCESS.md +++ b/PROCESS.md @@ -65,7 +65,7 @@ For non-milestone releases (e.g. 2.0.0-M1), we shall release from a release bran Before the release, the tests and other validation must be passing. -Currently, the best way to release cats is: +Currently, the best way to release Cats is: 1. Run `+ clean` to ensure a clean start. 2. Run `+ package` to ensure everything builds. diff --git a/README.md b/README.md index b693443b36..63bc031ab3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ * **Jun 3 2019** [Cats 1.6.1 is released](https://github.com/typelevel/cats/releases/tag/v1.6.1) with backported bug fixes * **Jun 1 2019** [Cats 2.0.0-M3 is released](https://github.com/typelevel/cats/releases/tag/v2.0.0-M3) with support for Scala 2.13.0-RC3 * **May 25 2019** [Cats 2.0.0-M2 is released](https://github.com/typelevel/cats/releases/tag/v2.0.0-M2) with support for Scala 2.13.0-RC2 -* **Apr 26 2019** [We launched a sustainability program](https://typelevel.org/blog/2019/04/24/typelevel-sustainability-program-announcement.html). Please consider supporting us. +* **Apr 26 2019** [We launched a sustainability program](https://typelevel.org/blog/2019/04/24/typelevel-sustainability-program-announcement.html). Please consider supporting us. * **Apr 25 2019** [Cats 2.0.0-M1 is released](https://github.com/typelevel/cats/releases/tag/v2.0.0-M1) with binary compatibility with 1.x on `cats-kernel`, `cats-core` and `cats-free` * **Feb 15 2019** [Cats 2019 roadmap](https://github.com/typelevel/cats/blob/master/ROADMAP_2019.md) is published. * **Jan 31 2019** Cats 1.6.0 is released. @@ -58,17 +58,14 @@ Gold Sponsors are those who have pledged $5,000 to $10,000. Silver Sponsors are those who have pledged $2,000 to $5,000. - - + - BECOME A SPONSOR ### Getting Started -Cats is currently available for Scala 2.10 (up to 1.2.x), 2.11, 2.12, 2.13.0, and [Scala.js](http://www.scala-js.org/). - +Cats is currently available for Scala 2.10 (up to 1.2.x), 2.11, 2.12, 2.13.0, and [Scala.js](http://www.scala-js.org/). Cats relies on improved type inference via the fix for [SI-2712](https://github.com/scala/bug/issues/2712), which is not enabled by default. For **Scala 2.11.9 or later** you should add the following to your `build.sbt`: @@ -143,12 +140,12 @@ By sharing the same set of type classes, instances and data types provided by Ca * [newts](https://github.com/julien-truffaut/newts): Defines newtypes compatible with Cats type classes * [origami](https://github.com/atnos-org/origami): monadic folds * [refined](https://github.com/fthomas/refined): simple refinement types for Scala - * [shims](https://github.com/djspiewak/shims): seamless interoperability for cats and scalaz typeclasses and datatypes + * [shims](https://github.com/djspiewak/shims): seamless interoperability for Cats and scalaz typeclasses and datatypes #### Libraries with more specific uses * [atto](https://github.com/tpolecat/atto): friendly little text parsers - * [cats-scalacheck](https://github.com/ChristopherDavenport/cats-scalacheck): cats typeclass instances for scalacheck + * [cats-scalacheck](https://github.com/ChristopherDavenport/cats-scalacheck): Cats typeclass instances for ScalaCheck * [cats-time](https://github.com/ChristopherDavenport/cats-time): cats typeclass instances for java time * [circe](https://github.com/circe/circe): pure functional JSON library * [Ciris](https://github.com/vlovgr/ciris): Lightweight, extensible, and validated configuration loading in Scala @@ -183,8 +180,8 @@ By sharing the same set of type classes, instances and data types provided by Ca * [seals](https://github.com/durban/seals): tools for schema evolution and language-integrated schemata * [sup](https://github.com/kubukoz/sup): Composable, purely functional healthchecks in Scala * [tsec](https://github.com/jmcardon/tsec/): Typesafe, functional, general purpose cryptography and security library - -Your project talks cats too? [Submit a PR to add it here!](https://github.com/typelevel/cats/edit/master/README.md) + +Your project talks Cats too? [Submit a PR to add it here!](https://github.com/typelevel/cats/edit/master/README.md) *The full-size [Cats logo](https://typelevel.org/cats/img/cats-logo.png) is available for use for Cats related projects, contents, souvenirs, etc.* @@ -247,7 +244,7 @@ with the previous `1.0.x` versions. I.E. the new JAR will be a drop-in replaceme 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. +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 @@ -347,7 +344,7 @@ The current maintainers (people who can merge pull requests) are: 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](https://github.com/typelevel/cats/blob/master/PROCESS.md). +relax this to a single sign-off. More detail in the [process document](https://github.com/typelevel/cats/blob/master/PROCESS.md). ### Copyright and License diff --git a/ROADMAP_2019.md b/ROADMAP_2019.md index 0d88d75005..cc126d4f2c 100644 --- a/ROADMAP_2019.md +++ b/ROADMAP_2019.md @@ -5,19 +5,19 @@ A Cats 2.0 is released earlier in the year **without any breaking changes on mos The followings are the steps in each quarter. -## Q1 +## Q1 #### Release 1.6 [already done] #### Release 2.0: This is not the Cats 2.0 we’ve been discussing in the past. Most modules remain fully binary compatible with Cats 1.x on all Scala versions. The only breaking changes are: -* Scalacheck 1.13, update to Scalacheck 1.14 +* ScalaCheck 1.13, update to ScalaCheck 1.14 * breaking changes for Cats-laws -## Q2 +## Q2 Start a Scala 2.11 dedicated branching scheme: * Branch master - drops Scala 2.11, maintains is BC with 1.x * Branch scala2_11 - Scala 2.11 code New changes to master have to be ported to branch scala2_11 in a 2.11 BC compatible way and try to maintain as use site source compatible as possible - e.g. a new type class method added to master is added to a syntax trait method in scala2_11 branch. ### Release Cats 2.1 RC1 on both Scala 2.11 and Scala 2.12+ - Note that 2.11 and 2.12+ code are NOT source compatible with each other, however, they will still maintain source compatibility with 2.0 and 1.x. +Note that 2.11 and 2.12+ code are NOT source compatible with each other, however, they will still maintain source compatibility with 2.0 and 1.x. ### Release Cats 2.1 RC2 ### Release Cats 2.1 @@ -26,7 +26,7 @@ New changes to master have to be ported to branch scala2_11 in a 2.11 BC compati ### Release Cats 2.2 ### Release Cats 2.3 -## Q4 +## Q4 ### Release Cats 2.4 - last release on Scala 2.11 ### Stops actively maintaining scala2_11 branch ### Release Cats 2.5 without scala 2.11 diff --git a/alleycats-core/README.md b/alleycats-core/README.md index 17a0b10d38..2eaaa48297 100644 --- a/alleycats-core/README.md +++ b/alleycats-core/README.md @@ -13,7 +13,7 @@ other cases, type classes which lack laws or constraints may still be useful in some cases (e.g. `Empty[_]`, a type class which provides some notion of "emptiness"). -Rather than argue about whether to permit these types in cats proper, we +Rather than argue about whether to permit these types in Cats proper, we provide a (slightly disreputable) home for them here. ### Type classes @@ -106,7 +106,7 @@ values of a map as a `Foldable` collection. Alleycats provides a `Foldable[Itera import cats.implicits._ import alleycats.std.iterable._ -//Result "AppleOrange" +// Result "AppleOrange" Map(1 -> "Apple", 2 -> "Orange").values.combineAll ``` @@ -114,5 +114,5 @@ Map(1 -> "Apple", 2 -> "Orange").values.combineAll This module's goal is to be very liberal about accepting type class instances, but to only provide instances which are absent from -cats proper. Law-abiding instances will end up in cats, and everything else will +Cats proper. Law-abiding instances will end up in Cats, and everything else will end up here. diff --git a/build.sbt b/build.sbt index eabf37864f..d5b02be219 100644 --- a/build.sbt +++ b/build.sbt @@ -56,12 +56,12 @@ lazy val commonSettings = Seq( resolvers ++= Seq(Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots")), parallelExecution in Test := false, scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings"), - //todo: reenable doctests on 2.13 once it's officially released. it's disabled for now due to changes to the `toString` impl of collections + // TODO: reenable doctests on 2.13 once it's officially released. it's disabled for now due to changes to the `toString` impl of collections doctestGenTests := { val unchanged = doctestGenTests.value if (priorTo2_13(scalaVersion.value)) unchanged else Nil }, - //todo: re-enable disable scaladoc on 2.13 due to https://github.com/scala/bug/issues/11045 + // TODO: re-enable disable scaladoc on 2.13 due to https://github.com/scala/bug/issues/11045 sources in (Compile, doc) := { val docSource = (sources in (Compile, doc)).value if (priorTo2_13(scalaVersion.value)) docSource else Nil @@ -118,7 +118,7 @@ lazy val commonJsSettings = Seq( scalaJSStage in Global := FastOptStage, parallelExecution := false, jsEnv := new org.scalajs.jsenv.nodejs.NodeJSEnv(), - // batch mode decreases the amount of memory needed to compile scala.js code + // batch mode decreases the amount of memory needed to compile Scala.js code scalaJSOptimizerOptions := scalaJSOptimizerOptions.value.withBatchMode(isTravisBuild.value), // currently sbt-doctest doesn't work in JS builds // https://github.com/tkawachi/sbt-doctest/issues/52 @@ -135,7 +135,7 @@ lazy val commonJvmSettings = Seq( ) lazy val commonNativeSettings = Seq( - scalaVersion := "2.11.12", //TODO load scala version form .travis.yml: https://github.com/dwijnand/sbt-travisci/issues/11 + scalaVersion := "2.11.12", // TODO: load scala version form .travis.yml: https://github.com/dwijnand/sbt-travisci/issues/11 crossScalaVersions := Seq("2.11.12") ) @@ -806,7 +806,7 @@ def commonScalacOptions(scalaVersion: String) = ) ++ (if (priorTo2_13(scalaVersion)) Seq( "-Yno-adapted-args", - "-Xfatal-warnings", //todo: add the following two back to 2.13 + "-Xfatal-warnings", // TODO: add the following two back to 2.13 "-deprecation" ) else diff --git a/docs/src/main/tut/datatypes/freemonad.md b/docs/src/main/tut/datatypes/freemonad.md index 02bf62c224..13816760dc 100644 --- a/docs/src/main/tut/datatypes/freemonad.md +++ b/docs/src/main/tut/datatypes/freemonad.md @@ -21,11 +21,11 @@ In particular, *free monads* provide a practical way to: - build an embedded DSL (domain-specific language) - retarget a computation to another interpreter using natural transformations -> (In cats, the type representing a *free monad* is abbreviated as `Free[_]`.) +> (In Cats, the type representing a *free monad* is abbreviated as `Free[_]`.) ## Using Free Monads -If you'd like to use cats' free monad, you'll need to add a library dependency +If you'd like to use Cats' free monad, you'll need to add a library dependency for the `cats-free` module. A good way to get a sense for how *free monads* work is to see them in diff --git a/docs/src/main/tut/datatypes/oneand.md b/docs/src/main/tut/datatypes/oneand.md index 24650a619e..1eb58aee3f 100644 --- a/docs/src/main/tut/datatypes/oneand.md +++ b/docs/src/main/tut/datatypes/oneand.md @@ -19,7 +19,7 @@ import cats.data.OneAnd type NonEmptyList[A] = OneAnd[List, A] ``` -which used to be the implementation of non-empty lists in cats but has +which used to be the implementation of non-empty lists in Cats but has been replaced by the `cats.data.NonEmptyList` data type. By having the higher kinded type parameter `F[_]`, `OneAnd` is also able to represent other "non-empty" data structures e.g. diff --git a/docs/src/main/tut/datatypes/validated.md b/docs/src/main/tut/datatypes/validated.md index 799f931a68..cdfd52ba6d 100644 --- a/docs/src/main/tut/datatypes/validated.md +++ b/docs/src/main/tut/datatypes/validated.md @@ -254,7 +254,7 @@ Let's see what changed here: 4. `.validNec` and `.invalidNec` combinators lets you _lift_ the success or failure in their respective container (either a `Valid` or `Invalid[NonEmptyChain[A]]`). 5. The [applicative](../typeclasses/applicative.html) syntax `(a, b, c, ...).mapN(...)` provides us a way to accumulatively apply the validation functions and yield a product with their successful result or the accumulated errors in the `NonEmptyChain`. Then, we transform that product with `mapN` into a valid instance of `RegistrationData`. -**Deprecation notice:** since cats `1.0.0-MF` the cartesian syntax `|@|` for applicatives is deprecated. If you're using `0.9.0` or less, you can use the syntax: `(a |@| b |@| ...).map(...)`. +**Deprecation notice:** since Cats `1.0.0-MF` the cartesian syntax `|@|` for applicatives is deprecated. If you're using `0.9.0` or less, you can use the syntax: `(a |@| b |@| ...).map(...)`. Note that, at the end, we expect to lift the result of the validation functions in a `RegistrationData` instance. If the process fails, we'll get our `NonEmptyChain` detailing what went wrong. diff --git a/docs/src/main/tut/faq.md b/docs/src/main/tut/faq.md index 0640482823..5533bbd777 100644 --- a/docs/src/main/tut/faq.md +++ b/docs/src/main/tut/faq.md @@ -28,11 +28,11 @@ position: 40 * [How can I help?](#contributing) * [Is there a sbt plugin that facilitate projects based on the Cats ecosystem libraries?](#sbt-catalysts) * [Why aren't monad transformers like `OptionT` and `EitherT` covariant like `Option` and `Either`?](#monad-transformer-variance) - * [How to try cats in a REPL?](#ammonite) + * [How to try Cats in a REPL?](#ammonite) ## What imports do I need? -The easiest approach to cats imports is to import everything that's commonly needed: +The easiest approach to Cats imports is to import everything that's commonly needed: ```tut:silent import cats._ @@ -133,9 +133,9 @@ As an alternative, using `.toNested` on the monad transformer is recommended, al ## Where is IO/Task? -In purely functional programming, a monadic `IO` or `Task` type is often used to handle side effects such as file/network IO. In some languages and frameworks, such a type also serves as the primary abstraction through which parallelism is achieved. Nearly every real-world purely functional application or service is going to require such a data type, and this gives rise to an obvious question: why doesn't cats include such a type? +In purely functional programming, a monadic `IO` or `Task` type is often used to handle side effects such as file/network IO. In some languages and frameworks, such a type also serves as the primary abstraction through which parallelism is achieved. Nearly every real-world purely functional application or service is going to require such a data type, and this gives rise to an obvious question: why doesn't Cats include such a type? -The answer is that cats *does* include an `IO`, it just isn't included in the core library. The decision was made to split `IO` away from cats-core and (indeed the whole cats release cycle!) in order to make it easier to ensure modular versioning and compatibility across the ecosystem. The [cats-effect](https://github.com/typelevel/cats-effect) project defines a type, `cats.effect.IO`, which is intended to be a very minimal, very performant data type for managing synchronous and asynchronous side-effects, integrated into the cats ecosystem. +The answer is that Cats *does* include an `IO`, it just isn't included in the core library. The decision was made to split `IO` away from cats-core and (indeed the whole Cats release cycle!) in order to make it easier to ensure modular versioning and compatibility across the ecosystem. The [cats-effect](https://github.com/typelevel/cats-effect) project defines a type, `cats.effect.IO`, which is intended to be a very minimal, very performant data type for managing synchronous and asynchronous side-effects, integrated into the Cats ecosystem. However, we acknowledge that this type may not meet everyone's needs. The cats-effect project characterizes the space of side-effect-capturing data types with a set of typeclasses (deriving from `cats.Monad`), and so all such data types are, broadly-speaking, mutually compatible and interchangeable in many generic contexts. For example, [Monix](https://monix.io) provides support for IO, concurrency, and streaming and integrates with the cats-effect type classes. @@ -157,7 +157,7 @@ Cats defines a wealth of type classes and type class instances. For a number of ## What does `macro Ops` do? What is `cats.macros.Ops`? -`macro Ops` invokes the [Machinist](https://github.com/typelevel/machinist) Ops macro, and is used in cats in a number of places to enrich types with operations with the minimal possible cost when those operations are called in code. Machinist supports an extension mechanism where users of the macro can provide a mapping between symbolic operator names and method names. The `cats.macros.Ops` class uses this extension mechanism to supply the set of mappings that the cats project is interested in. +`macro Ops` invokes the [Machinist](https://github.com/typelevel/machinist) Ops macro, and is used in Cats in a number of places to enrich types with operations with the minimal possible cost when those operations are called in code. Machinist supports an extension mechanism where users of the macro can provide a mapping between symbolic operator names and method names. The `cats.macros.Ops` class uses this extension mechanism to supply the set of mappings that the Cats project is interested in. More about the history of machinist and how it works can be discovered at the [project page](https://github.com/typelevel/machinist), or [this article on the typelevel blog](http://typelevel.org/blog/2013/10/13/spires-ops-macros.html). @@ -218,7 +218,7 @@ In some cases you may decide that providing a lawful `tailRecM` may be impractic ## What does this symbol mean? -Below is a list of symbols used in cats. +Below is a list of symbols used in Cats. The `~>`, `⊥`, `⊤`, `:<:` and `:≺:` symbols can be imported with `import cats._`. @@ -259,11 +259,11 @@ You can find more information [here](typeclasses/lawtesting.html). ## How can I help? -The cats community welcomes and encourages contributions, even if you are completely new to cats and functional programming. Here are a few ways to help out: +The Сats community welcomes and encourages contributions, even if you are completely new to Сats and functional programming. Here are a few ways to help out: - Find an undocumented method and write a ScalaDoc entry for it. See [Arrow.scala](https://github.com/typelevel/cats/blob/master/core/src/main/scala/cats/arrow/Arrow.scala) for some examples of ScalaDoc entries that use [sbt-doctest](https://github.com/tkawachi/sbt-doctest). - Look at the [code coverage report](https://codecov.io/github/typelevel/cats?branch=master), find some untested code, and write a test for it. Even simple helper methods and syntax enrichment should be tested. -- Find an [open issue](https://github.com/typelevel/cats/issues?q=is%3Aopen+is%3Aissue+label%3Aready), leave a comment on it to let people know you are working on it, and submit a pull request. If you are new to cats, you may want to look for items with the [low-hanging-fruit](https://github.com/typelevel/cats/issues?q=is%3Aopen+is%3Aissue+label%3A%22low-hanging+fruit%22) label. +- Find an [open issue](https://github.com/typelevel/cats/issues?q=is%3Aopen+is%3Aissue+label%3Aready), leave a comment on it to let people know you are working on it, and submit a pull request. If you are new to Сats, you may want to look for items with the [low-hanging-fruit](https://github.com/typelevel/cats/issues?q=is%3Aopen+is%3Aissue+label%3A%22low-hanging+fruit%22) label. See the [contributing guide]({{ site.baseurl }}/contributing.html) for more information. diff --git a/docs/src/main/tut/guidelines.md b/docs/src/main/tut/guidelines.md index f6589d45f5..309be8a344 100644 --- a/docs/src/main/tut/guidelines.md +++ b/docs/src/main/tut/guidelines.md @@ -7,7 +7,7 @@ position: 70 # Guidelines -All guidelines in cats should have clear justifications. There is no room for tribal wisdom in a simple library. +All guidelines in Сats should have clear justifications. There is no room for tribal wisdom in a simple library. ## Syntax @@ -42,8 +42,8 @@ pure[List, Int](1) ``` Note that the type `A` should've been given by the `a: A` argument, but since scalac cannot infer `F[_]`, the user still has to specify all type params. -In cats, we use a technique described in - Rob Norris’s [Kinda-Curried Type Parameters](https://tpolecat.github.io/2015/07/30/infer.html) to overcome this restriction of scala inference. Here is a version of the `pure` using this technique in cats. +In Сats, we use a technique described in + Rob Norris’s [Kinda-Curried Type Parameters](https://tpolecat.github.io/2015/07/30/infer.html) to overcome this restriction of scala inference. Here is a version of the `pure` using this technique in Сats. ```scala package cats.data diff --git a/docs/src/main/tut/nomenclature.md b/docs/src/main/tut/nomenclature.md index 929554a684..4cb868270f 100644 --- a/docs/src/main/tut/nomenclature.md +++ b/docs/src/main/tut/nomenclature.md @@ -10,7 +10,7 @@ position: 60 > - How do I make a computation `F[A]` fail by checking a condition on the value? -This is a catalogue of the major functions, type classes, and data types in `cats`. It serves as a bird's-eye view of each class capabilities. It is also intended as a go-to reference for `cats` users, who may not recall the answer to questions like the ones above. +This is a catalogue of the major functions, type classes, and data types in `Cats`. It serves as a bird's-eye view of each class capabilities. It is also intended as a go-to reference for `Cats` users, who may not recall the answer to questions like the ones above. The signatures and type-classes have been simplified, are described [below](#simplifications). If you want a printable version, you can also check out this [cats-cheatsheet](https://arosien.github.io/cats-cheatsheets/typeclasses.pdf). @@ -72,7 +72,7 @@ _WARNING_: this page is written manually, and not automatically generated, so ma ### ApplicativeError -The source code of `cats` uses the `E` type variable for the error type. +The source code of `Cats` uses the `E` type variable for the error type. | Type | Method Name | Notes | |--------------|--------------|-------| @@ -274,7 +274,7 @@ Here, we use `Ki` as a short-hand for `Kleisli`. ## Simplifications -Because `cats` is a Scala library and Scala has many knobs and switches, the actual definitions and the implementations of the functions and type-classes in `cats` can be a bit obfuscated at first. To alleviate this, in this glossary we focus on the plain type signatures of the method, and ignore many of the details from Scala. In particular, in our type signatures: +Because `Сats` is a Scala library and Scala has many knobs and switches, the actual definitions and the implementations of the functions and type-classes in `Сats` can be a bit obfuscated at first. To alleviate this, in this glossary we focus on the plain type signatures of the method, and ignore many of the details from Scala. In particular, in our type signatures: - We use `A,B,C` for type variables of kind `*`, and `F, G, H` for type variables of a higher kind. - We write type signatures in currified form: parameters are taken one at a time, and they are separated with the arrow `=>` operation. In Scala, a method's parameters may be split in several comma-separated lists. diff --git a/docs/src/main/tut/typeclasses/imports.md b/docs/src/main/tut/typeclasses/imports.md index 43bcb16b12..abe2ea96c9 100644 --- a/docs/src/main/tut/typeclasses/imports.md +++ b/docs/src/main/tut/typeclasses/imports.md @@ -5,7 +5,7 @@ section: "imports" --- # Imports -The easiest approach to cats imports is to import everything that's commonly needed: +The easiest approach to Сats imports is to import everything that's commonly needed: ```tut:silent import cats._ @@ -31,7 +31,7 @@ import cats.data.State The `cats.implicits._` import does a couple of things. Firstly, it brings in implicit type class instances for standard library types - so after this import you will have `Monad[List]` and `Semigroup[Int]` instances in implicit scope. Secondly, it adds syntax enrichment onto certain types to provide some handy methods such as right-biased `Either` combinators: ```tut:book -// cats adds right-biased combinators to the standard library's Either +// Сats adds right-biased combinators to the standard library's Either val e: Either[String, Int] = Right(3) e.map(_ + 1) @@ -71,7 +71,7 @@ import cats.instances.all._ import cats.syntax.semigroup._ val x = -2 |+| 1 -//now we also need access to isEmpty from Monoid +// now we also need access to isEmpty from Monoid import cats.syntax.monoid._ (x |+| 1).isEmpty //error: value |+| is not a member of Int ``` diff --git a/docs/src/main/tut/typeclasses/lawtesting.md b/docs/src/main/tut/typeclasses/lawtesting.md index 9901bd6021..f992e54cd6 100644 --- a/docs/src/main/tut/typeclasses/lawtesting.md +++ b/docs/src/main/tut/typeclasses/lawtesting.md @@ -135,7 +135,7 @@ And voila, you've successfully proven that your data type upholds the Functor la ### Testing cats.kernel instances -For most of the type classes included in cats, the above will work great. +For most of the type classes included in Cats, the above will work great. However, the law tests for the type classes inside `cats.kernel` are located in `cats.kernel.laws.discipline.*` instead. So we have to import from there to test type classes like `Semigroup`, `Monoid`, `Group` or `Semilattice`. diff --git a/docs/src/main/tut/typeclasses/monad.md b/docs/src/main/tut/typeclasses/monad.md index c69ee805fe..229dc2194f 100644 --- a/docs/src/main/tut/typeclasses/monad.md +++ b/docs/src/main/tut/typeclasses/monad.md @@ -56,7 +56,7 @@ implicit def optionMonad(implicit app: Applicative[Option]) = ### flatMap -`flatMap` is often considered to be the core function of `Monad`, and cats +`flatMap` is often considered to be the core function of `Monad`, and Cats follows this tradition by providing implementations of `flatten` and `map` derived from `flatMap` and `pure`. diff --git a/docs/src/main/tut/typeclasses/parallel.md b/docs/src/main/tut/typeclasses/parallel.md index 1a07568550..e28aeb4865 100644 --- a/docs/src/main/tut/typeclasses/parallel.md +++ b/docs/src/main/tut/typeclasses/parallel.md @@ -7,7 +7,7 @@ scaladoc: "#cats.Parallel" --- # Parallel -When browsing the various `Monads` included in cats, +When browsing the various `Monads` included in Cats, you may have noticed that some of them have data types that are actually of the same structure, but instead have instances of `Applicative`. E.g. `Either` and `Validated`. @@ -60,7 +60,7 @@ def parsePerson(ageString: String, nameString: String) = We had to convert to and from `Validated` manually. While this is still manageble, it get's worse the more `Eithers` we want to combine in parallel. -To mitigate this pain, cats introduces a type class `Parallel` that abstracts over `Monads` which also support parallel composition. +To mitigate this pain, Cats introduces a type class `Parallel` that abstracts over `Monads` which also support parallel composition. It is simply defined in terms of conversion functions between the two data types: ```scala diff --git a/docs/src/main/tut/typeclasses/show.md b/docs/src/main/tut/typeclasses/show.md index e7a83b9a01..79c2f0d5ee 100644 --- a/docs/src/main/tut/typeclasses/show.md +++ b/docs/src/main/tut/typeclasses/show.md @@ -27,7 +27,7 @@ The fact that this code compiles is a design flaw of the Java API. We want to make things like this impossible, by offering the `toString` equivalent as a type class, instead of the root of the class hierarchy. In short, `Show` allows us to only have String-conversions defined for the data types we actually want. -To make things easier, cats defines a few helper functions to make creating `Show` instances easier. +To make things easier, Cats defines a few helper functions to make creating `Show` instances easier. ```scala /** creates an instance of Show using the provided function */ diff --git a/docs/src/main/tut/typeclasses/typeclasses.md b/docs/src/main/tut/typeclasses/typeclasses.md index a0fb8bb2cc..1e8cacb73e 100644 --- a/docs/src/main/tut/typeclasses/typeclasses.md +++ b/docs/src/main/tut/typeclasses/typeclasses.md @@ -223,7 +223,7 @@ type class instances easy. You can find out more about law testing [here](typeclasses/lawtesting.html). -## Type classes in cats +## Type classes in Cats infographic From [cats-infographic by @tpolecat](https://github.com/tpolecat/cats-infographic). diff --git a/free/src/main/scala/cats/free/Free.scala b/free/src/main/scala/cats/free/Free.scala index e31d758d84..097ff9ed98 100644 --- a/free/src/main/scala/cats/free/Free.scala +++ b/free/src/main/scala/cats/free/Free.scala @@ -258,7 +258,7 @@ object Free extends FreeInstances { * This method exists to allow the `F` and `G` parameters to be * bound independently of the `A` parameter below. */ - // TODO to be deprecated / removed in cats 2.0 + // TODO: to be deprecated / removed in cats 2.0 def inject[F[_], G[_]]: FreeInjectKPartiallyApplied[F, G] = new FreeInjectKPartiallyApplied diff --git a/kernel-laws/shared/src/test/scala/cats/kernel/laws/LawTests.scala b/kernel-laws/shared/src/test/scala/cats/kernel/laws/LawTests.scala index 0f165b677d..92edc5f58e 100644 --- a/kernel-laws/shared/src/test/scala/cats/kernel/laws/LawTests.scala +++ b/kernel-laws/shared/src/test/scala/cats/kernel/laws/LawTests.scala @@ -63,12 +63,12 @@ object KernelCheck { ) } - // this instance is not available in scalacheck 1.13.2. + // this instance is not available in ScalaCheck 1.13.2. // remove this once a newer version is available. implicit val cogenBigInt: Cogen[BigInt] = Cogen[Long].contramap(_.toLong) - // this instance is not available in scalacheck 1.13.2. + // this instance is not available in ScalaCheck 1.13.2. // remove this once a newer version is available. implicit val cogenBigDecimal: Cogen[BigDecimal] = Cogen[Double].contramap(_.toDouble) @@ -114,7 +114,7 @@ class Tests extends AnyFunSuiteLike with Discipline { import KernelCheck._ - // The scalacheck defaults (100,100) are too high for scala-js. + // The ScalaCheck defaults (100,100) are too high for Scala.js. final val PropMaxSize: PosZInt = if (Platform.isJs) 10 else 100 final val PropMinSuccessful: PosInt = if (Platform.isJs) 10 else 100 final val PropWorkers: PosInt = if (Platform.isJvm) PosInt(2) else PosInt(1) diff --git a/laws/src/main/scala/cats/laws/discipline/Arbitrary.scala b/laws/src/main/scala/cats/laws/discipline/Arbitrary.scala index fa99582c5e..a1025c9219 100644 --- a/laws/src/main/scala/cats/laws/discipline/Arbitrary.scala +++ b/laws/src/main/scala/cats/laws/discipline/Arbitrary.scala @@ -15,12 +15,12 @@ import org.scalacheck.Arbitrary.{arbitrary => getArbitrary} */ object arbitrary extends ArbitraryInstances0 { - // this instance is not available in scalacheck 1.13.2. + // this instance is not available in ScalaCheck 1.13.2. // remove this once a newer version is available. implicit val catsLawsCogenForThrowable: Cogen[Throwable] = Cogen[String].contramap(_.toString) - // this instance is not available in scalacheck 1.13.2. + // this instance is not available in ScalaCheck 1.13.2. // remove this once a newer version is available. implicit def catsLawsCogenForTry[A](implicit A: Cogen[A]): Cogen[Try[A]] = Cogen( @@ -31,7 +31,7 @@ object arbitrary extends ArbitraryInstances0 { } ) - // this instance is not available in scalacheck 1.13.2. + // this instance is not available in ScalaCheck 1.13.2. // remove this once a newer version is available. implicit def catsLawsCogenForFunction0[A](implicit A: Cogen[A]): Cogen[Function0[A]] = A.contramap(_()) @@ -175,7 +175,7 @@ object arbitrary extends ArbitraryInstances0 { implicit def catsLawsCogenForWriter[L: Cogen, V: Cogen]: Cogen[Writer[L, V]] = Cogen[(L, V)].contramap(_.run) - // until this is provided by scalacheck + // until this is provided by ScalaCheck implicit def catsLawsArbitraryForPartialFunction[A, B]( implicit F: Arbitrary[A => Option[B]] ): Arbitrary[PartialFunction[A, B]] = diff --git a/laws/src/main/scala/cats/laws/discipline/ExhaustiveCheck.scala b/laws/src/main/scala/cats/laws/discipline/ExhaustiveCheck.scala index f5446c6f1c..1931a58a14 100644 --- a/laws/src/main/scala/cats/laws/discipline/ExhaustiveCheck.scala +++ b/laws/src/main/scala/cats/laws/discipline/ExhaustiveCheck.scala @@ -3,7 +3,7 @@ package laws package discipline /** - * An `ExhuastiveCheck[A]` instance can be used similarly to a Scalacheck + * An `ExhuastiveCheck[A]` instance can be used similarly to a ScalaCheck * `Gen[A]` instance, but differs in that it generates a `Stream` of the entire * domain of values as opposed to generating a random sampling of values. */ diff --git a/scalafix/README.md b/scalafix/README.md index ff65afa2dd..9ef6247472 100644 --- a/scalafix/README.md +++ b/scalafix/README.md @@ -2,7 +2,7 @@ ## Try this! -[Install the scalafix sbt plugin](https://scalacenter.github.io/scalafix/docs/users/installation) +[Install the Scalafix sbt plugin](https://scalacenter.github.io/scalafix/docs/users/installation) To run all rules that apply to version `1.0.0-RC1` run diff --git a/scalafix/build.sbt b/scalafix/build.sbt index 93ff410190..5001f91583 100644 --- a/scalafix/build.sbt +++ b/scalafix/build.sbt @@ -1,4 +1,4 @@ -// Use a scala version supported by scalafix. +// Use a scala version supported by Scalafix. val V = _root_.scalafix.Versions scalaVersion in ThisBuild := V.scala212 diff --git a/scripts/travis-publish.sh b/scripts/travis-publish.sh index 0a333e8d0c..a3feabe891 100755 --- a/scripts/travis-publish.sh +++ b/scripts/travis-publish.sh @@ -8,8 +8,8 @@ # b. Builds and tests for the JVM using the validateJVM target, and then # c. Produces the coverage report, and then # d. Clean is run (as part of coverageReport), to clear down the built artifacts -# 2. The scalafix subdirectory is run, executing the tests inside. -# 3. The scala js build is executed, compiling the application and testing it for scala js. +# 2. The Scalafix subdirectory is run, executing the tests inside. +# 3. The Scala.js build is executed, compiling the application and testing it. # 4. The validateJVM target is executed again, due to the fact that producing coverage with the # code coverage tool causes the byte code to be instrumented/modified to record the coverage # metrics when the tests are executing. This causes the full JVM build to be run a second time. diff --git a/shell.nix b/shell.nix index 661b5e4141..3a510eaadd 100644 --- a/shell.nix +++ b/shell.nix @@ -17,7 +17,7 @@ in buildInputs = [ sbt git # used by sbt-buildinfo - nodejs # used by scala.js + nodejs # used by Scala.js jekyll # used by sbt-microsites gawk # used by scripts/parse-test-durations.awk graphviz # used for ScalaDoc diagrams diff --git a/tests/src/test/scala/cats/tests/AsSuite.scala b/tests/src/test/scala/cats/tests/AsSuite.scala index ead924adcc..2e32e5e0c0 100644 --- a/tests/src/test/scala/cats/tests/AsSuite.scala +++ b/tests/src/test/scala/cats/tests/AsSuite.scala @@ -10,7 +10,7 @@ class AsSuite extends CatsSuite { def toMap[A, B, X](fa: List[X])(implicit ev: X <~< (A, B)): Map[A, B] = { type RequiredFunc = (Map[A, B], X) => Map[A, B] type GivenFunc = (Map[A, B], (A, B)) => Map[A, B] - val subst: GivenFunc <~< RequiredFunc = As.contra2_3(ev) //introduced because inference failed on scalajs on 2.10.6 + val subst: GivenFunc <~< RequiredFunc = As.contra2_3(ev) // because inference failed on Scala.js on 2.10.6 fa.foldLeft(Map.empty[A, B])(subst(_ + _)) } diff --git a/tests/src/test/scala/cats/tests/BinestedSuite.scala b/tests/src/test/scala/cats/tests/BinestedSuite.scala index 8580b07412..ed3016c18a 100644 --- a/tests/src/test/scala/cats/tests/BinestedSuite.scala +++ b/tests/src/test/scala/cats/tests/BinestedSuite.scala @@ -10,7 +10,7 @@ import cats.laws.discipline.eq._ class BinestedSuite extends CatsSuite { // we have a lot of generated lists of lists in these tests. We have to tell - // Scalacheck to calm down a bit so we don't hit memory and test duration + // ScalaCheck to calm down a bit so we don't hit memory and test duration // issues. implicit override val generatorDrivenConfig: PropertyCheckConfiguration = PropertyCheckConfiguration(minSuccessful = 20, sizeRange = 5) diff --git a/tests/src/test/scala/cats/tests/EitherTSuite.scala b/tests/src/test/scala/cats/tests/EitherTSuite.scala index 88ecf882bc..1cef0fea24 100644 --- a/tests/src/test/scala/cats/tests/EitherTSuite.scala +++ b/tests/src/test/scala/cats/tests/EitherTSuite.scala @@ -31,7 +31,7 @@ class EitherTSuite extends CatsSuite { } { - //If a Functor for F is defined + // if a Functor for F is defined implicit val F = ListWrapper.functor checkAll("EitherT[ListWrapper, ?, ?]", @@ -44,7 +44,7 @@ class EitherTSuite extends CatsSuite { } { - //If a Traverse for F is defined + // if a Traverse for F is defined implicit val F = ListWrapper.traverse checkAll("EitherT[ListWrapper, Int, ?]", @@ -59,7 +59,7 @@ class EitherTSuite extends CatsSuite { } { - //if a Monad is defined + // if a Monad is defined implicit val F = ListWrapper.monad implicit val eq0 = EitherT.catsDataEqForEitherT[ListWrapper, String, Either[String, Int]] @@ -95,7 +95,7 @@ class EitherTSuite extends CatsSuite { } { - //if a Monad is defined + // if a Monad is defined implicit val F = ListWrapper.monad Functor[EitherT[ListWrapper, String, ?]] @@ -108,7 +108,7 @@ class EitherTSuite extends CatsSuite { } { - //If a foldable is defined + // if a foldable is defined implicit val F = ListWrapper.foldable checkAll("EitherT[ListWrapper, Int, ?]", FoldableTests[EitherT[ListWrapper, Int, ?]].foldable[Int, Int]) diff --git a/tests/src/test/scala/cats/tests/FoldableSuite.scala b/tests/src/test/scala/cats/tests/FoldableSuite.scala index 66c4f797f1..f015a7a0bf 100644 --- a/tests/src/test/scala/cats/tests/FoldableSuite.scala +++ b/tests/src/test/scala/cats/tests/FoldableSuite.scala @@ -326,7 +326,7 @@ class FoldableSuiteAdditional extends CatsSuite { eval.value should ===(fa.sum) - //Repeat here so the result is evaluated again + // Repeat here so the result is evaluated again eval.value should ===(fa.sum) } } diff --git a/tests/src/test/scala/cats/tests/FunctionSuite.scala b/tests/src/test/scala/cats/tests/FunctionSuite.scala index e261826c6b..44d9b3705f 100644 --- a/tests/src/test/scala/cats/tests/FunctionSuite.scala +++ b/tests/src/test/scala/cats/tests/FunctionSuite.scala @@ -44,7 +44,7 @@ class FunctionSuite extends CatsSuite { checkAll("Function1[MiniInt, Int]", SemigroupalTests[Function1[MiniInt, ?]].semigroupal[Int, Int, Int]) // TODO: make an binary compatible way to do this - //checkAll("Function1[Int => ?]", DeferTests[Function1[Int, ?]].defer[Int]) + // checkAll("Function1[Int => ?]", DeferTests[Function1[Int, ?]].defer[Int]) checkAll("Semigroupal[Function1[Int, ?]]", SerializableTests.serializable(Semigroupal[Function1[Int, ?]])) diff --git a/tests/src/test/scala/cats/tests/GroupSuite.scala b/tests/src/test/scala/cats/tests/GroupSuite.scala index eab792894c..30823e07de 100644 --- a/tests/src/test/scala/cats/tests/GroupSuite.scala +++ b/tests/src/test/scala/cats/tests/GroupSuite.scala @@ -19,7 +19,7 @@ class GroupSuite extends CatsSuite { } checkAll("Int", GroupTests[Int].group) -// float and double are *not* associative, and scalacheck knows +// float and double are *not* associative, and ScalaCheck knows // checkAll("Double", GroupLaws[Double].group) // checkAll("Float", GroupLaws[Float].group) checkAll("Long", GroupTests[Long].group) diff --git a/tests/src/test/scala/cats/tests/NestedSuite.scala b/tests/src/test/scala/cats/tests/NestedSuite.scala index 5864f1e3e1..90838806de 100644 --- a/tests/src/test/scala/cats/tests/NestedSuite.scala +++ b/tests/src/test/scala/cats/tests/NestedSuite.scala @@ -11,7 +11,7 @@ import cats.laws.discipline.eq._ class NestedSuite extends CatsSuite { // we have a lot of generated lists of lists in these tests. We have to tell - // Scalacheck to calm down a bit so we don't hit memory and test duration + // ScalaCheck to calm down a bit so we don't hit memory and test duration // issues. implicit override val generatorDrivenConfig: PropertyCheckConfiguration = PropertyCheckConfiguration(minSuccessful = 20, sizeRange = 5) @@ -148,7 +148,7 @@ class NestedSuite extends CatsSuite { } { - //ApplicativeError composition + // ApplicativeError composition implicit val instance = ListWrapper.applicative checkAll( @@ -196,7 +196,7 @@ class NestedSuite extends CatsSuite { } { - //NonEmptyTraverse composition + // NonEmptyTraverse composition checkAll( "Nested[NonEmptyList, NonEmptyVector, ?]", NonEmptyTraverseTests[Nested[NonEmptyList, NonEmptyVector, ?]] @@ -224,7 +224,7 @@ class NestedSuite extends CatsSuite { { import cats.laws.discipline.eq._ - //Distributive composition + // Distributive composition checkAll( "Nested[Function1[MiniInt, ?], Function0, ?]", DistributiveTests[Nested[Function1[MiniInt, ?], Function0, ?]].distributive[Int, Int, Int, Option, Function0] diff --git a/tests/src/test/scala/cats/tests/OptionTSuite.scala b/tests/src/test/scala/cats/tests/OptionTSuite.scala index 2a4173ad32..9aaa42d1a3 100644 --- a/tests/src/test/scala/cats/tests/OptionTSuite.scala +++ b/tests/src/test/scala/cats/tests/OptionTSuite.scala @@ -16,7 +16,7 @@ class OptionTSuite extends CatsSuite { checkAll("OptionT[Eval, ?]", FunctorFilterTests[OptionT[Eval, ?]].functorFilter[Int, Int, Int]) { - //If a Functor for F is defined + // if a Functor for F is defined implicit val F = ListWrapper.functor checkAll("OptionT[ListWrapper, ?]", FunctorFilterTests[OptionT[ListWrapper, ?]].functorFilter[Int, Int, Int]) @@ -26,7 +26,7 @@ class OptionTSuite extends CatsSuite { } { - //If a Traverse for F is defined + // if a Traverse for F is defined implicit val F = ListWrapper.traverse checkAll("OptionT[ListWrapper, ?]", TraverseFilterTests[OptionT[ListWrapper, ?]].traverseFilter[Int, Int, Int]) diff --git a/tests/src/test/scala/cats/tests/RepresentableSuite.scala b/tests/src/test/scala/cats/tests/RepresentableSuite.scala index 002127a708..71cfc02e37 100644 --- a/tests/src/test/scala/cats/tests/RepresentableSuite.scala +++ b/tests/src/test/scala/cats/tests/RepresentableSuite.scala @@ -68,7 +68,7 @@ class RepresentableSuite extends CatsSuite { { // the monadInstance below made a conflict to resolve this one. - // TODO ceedubs is this needed? + // TODO: ceedubs is this needed? implicit val isoFun1: Isomorphisms[MiniInt => ?] = Isomorphisms.invariant[MiniInt => ?] implicit val monadInstance = Representable.monad[MiniInt => ?] diff --git a/tests/src/test/scala/cats/tests/SetSuite.scala b/tests/src/test/scala/cats/tests/SetSuite.scala index a55853c251..7785d4cbf9 100644 --- a/tests/src/test/scala/cats/tests/SetSuite.scala +++ b/tests/src/test/scala/cats/tests/SetSuite.scala @@ -21,7 +21,7 @@ class SetSuite extends CatsSuite { } test("show keeps separate entries for items that map to identical strings") { - //note: this val name has to be the same to shadow the cats.instances instance + // note: this val name has to be the same to shadow the cats.instances instance implicit val catsStdShowForInt: Show[Int] = Show.show(_ => "1") // an implementation implemented as set.map(_.show).mkString(", ") would // only show one entry in the result instead of 3, because Set.map combines diff --git a/tests/src/test/scala/cats/tests/SortedSetSuite.scala b/tests/src/test/scala/cats/tests/SortedSetSuite.scala index 3ed2c65827..2f3c8a9cf9 100644 --- a/tests/src/test/scala/cats/tests/SortedSetSuite.scala +++ b/tests/src/test/scala/cats/tests/SortedSetSuite.scala @@ -38,7 +38,7 @@ class SortedSetSuite extends CatsSuite { checkAll("Hash[SortedSet[Int]]", HashTests[SortedSet[Int]].hash) test("show keeps separate entries for items that map to identical strings") { - //note: this val name has to be the same to shadow the cats.instances instance + // note: this val name has to be the same to shadow the cats.instances instance implicit val catsStdShowForInt: Show[Int] = Show.show(_ => "1") // an implementation implemented as set.map(_.show).mkString(", ") would // only show one entry in the result instead of 3, because SortedSet.map combines diff --git a/tests/src/test/scala/cats/tests/WriterTSuite.scala b/tests/src/test/scala/cats/tests/WriterTSuite.scala index e739b82f41..19b77528cc 100644 --- a/tests/src/test/scala/cats/tests/WriterTSuite.scala +++ b/tests/src/test/scala/cats/tests/WriterTSuite.scala @@ -12,7 +12,7 @@ class WriterTSuite extends CatsSuite { type Logged[A] = Writer[ListWrapper[Int], A] // we have a lot of generated lists of lists in these tests. We have to tell - // Scalacheck to calm down a bit so we don't hit memory and test duration + // ScalaCheck to calm down a bit so we don't hit memory and test duration // issues. implicit override val generatorDrivenConfig: PropertyCheckConfiguration = checkConfiguration.copy(sizeRange = 5)