Skip to content
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
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ lazy val cats = (project in file("."))
organization := "org.scala-exercises",
name := "exercises-cats",
scalaVersion := "2.11.7",
version := "0.1.2",
version := "0.2.1-SNAPSHOT",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
Expand Down
6 changes: 5 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.1.1", "0.13", "2.10")
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
)

addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.2.1-SNAPSHOT", "0.13", "2.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
2 changes: 1 addition & 1 deletion src/main/scala/catslib/Applicative.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import cats.std.all._
*
* @param name applicative
*/
object ApplicativeSection extends FlatSpec with Matchers with exercise.Section {
object ApplicativeSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** This method takes any value and returns the value in the context of
* the functor. For many familiar functors, how to do this is
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/Apply.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import cats.syntax.cartesian._
*
* @param name apply
*/
object ApplySection extends FlatSpec with Matchers with exercise.Section {
object ApplySection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** = map =
*
* Since `Apply` extends `Functor`, we can use the `map` method from `Functor`:
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/CatsLibrary.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package catslib
*
* @param name cats
*/
object CatsLibrary extends exercise.Library {
object CatsLibrary extends org.scalaexercises.definitions.Library {
override def owner = "scala-exercises"
override def repository = "exercises-cats"

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/Foldable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import cats.implicits._
*
* @param name foldable
*/
object FoldableSection extends FlatSpec with Matchers with exercise.Section {
object FoldableSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** = foldLeft =
*
* `foldLeft` is an eager left-associative fold on `F` using the given function.
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/FunctorSection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import cats.std.list._
*
* @param name functor
*/
object FunctorSection extends FlatSpec with Matchers with exercise.Section {
object FunctorSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** = Using Functor =
*
* == map ==
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/IdentitySection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.scalatest._
*
* @param name identity
*/
object IdentitySection extends FlatSpec with Matchers with exercise.Section {
object IdentitySection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** We can freely compare values of `Id[T]` with unadorned
* values of type `T`.
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/Monad.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MonadHelpers._
*
* @param name monad
*/
object MonadSection extends FlatSpec with Matchers with exercise.Section {
object MonadSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** The name `flatten` should remind you of the functions of the same name on many
* classes in the standard library.
*/
Expand Down
6 changes: 2 additions & 4 deletions src/main/scala/catslib/Monoid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import cats._
import cats.std.all._
import cats.syntax.all._

import MonoidHelpers._

/** `Monoid` extends the `Semigroup` type class, adding an
* `empty` method to semigroup's `combine`. The `empty` method must return a
* value that when combined with any other instance of that type returns the
Expand All @@ -27,7 +25,7 @@ import MonoidHelpers._
*
* @param name monoid
*/
object MonoidSection extends FlatSpec with Matchers with exercise.Section {
object MonoidSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** First some imports.
*
* {{{
Expand Down Expand Up @@ -69,7 +67,7 @@ object MonoidSection extends FlatSpec with Matchers with exercise.Section {
/** To use this
* with a function that produces a tuple, we can define a `Monoid` for a tuple
* that will be valid for any tuple where the types it contains also have a
* `Monoid` available.
* `Monoid` available. Note that cats already defines it for you.
*
* {{{
* implicit def monoidTuple[A: Monoid, B: Monoid]: Monoid[(A, B)] =
Expand Down
16 changes: 0 additions & 16 deletions src/main/scala/catslib/MonoidHelpers.scala

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/scala/catslib/Semigroup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import cats._
*
* @param name semigroup
*/
object SemigroupSection extends FlatSpec with Matchers with exercise.Section {
object SemigroupSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** Now that you've learned about the `Semigroup` instance for `Int` try to
* guess how it works in the following examples:
*
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/Traverse.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import TraverseHelpers._
*
* @param name traverse
*/
object TraverseSection extends FlatSpec with Matchers with exercise.Section {
object TraverseSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** == Choose your effect ==
*
* The type signature of `Traverse` appears highly abstract, and indeed it is - what `traverse` does as it
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/Validated.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ import ValidatedHelpers._
*
* @param name validated
*/
object ValidatedSection extends FlatSpec with Matchers with exercise.Section {
object ValidatedSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
/** When no errors are present in the configuration, we get a `ConnectionParams` wrapped in a `Valid` instance.
*/
def noErrors(res0: Boolean, res1: String, res2: Int) = {
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/catslib/XorSection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ object XorStyleWithAdts {
*
* @param name xor
*/
object XorSection extends FlatSpec with Matchers with exercise.Section {
object XorSection extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {

/** More often than not we want to just bias towards one side and call it a day - by convention,
* the right side is most often chosen. This is the primary difference between `Xor` and `Either` -
Expand Down