Skip to content
Cats Instances For Scalacheck
Branch: master
Clone or download
Latest commit 244cf25 Jun 10, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
core/shared/src Add FunctorFilter instance Nov 21, 2018
docs/src/main/tut Add FunctorFilter instance Nov 21, 2018
project Update tut-plugin to 0.6.12 Jun 8, 2019
.scalafmt.conf Initial Commit May 10, 2018
.travis.yml Update Scala Version Mar 12, 2019 Add Code of Conduct Aug 25, 2018
LICENSE Add License, Update Readme and Build May 10, 2018 Code sample in the readme was fixed (mostly copied from the microsite) Jan 17, 2019
version.sbt Setting version to 0.1.2-SNAPSHOT Mar 13, 2019

cats-scalacheck Build Status Maven Central

Inspiration Was Taken From the never published cats-check. Instances for Cats for scalacheck types. So all credit to erik-stripe and the last maintainer mdedetrich for their original work on this that helped me build this.

Quick Start

To use cats-scalacheck in an existing SBT project with Scala 2.11 or a later version, add the following dependency to your build.sbt:

libraryDependencies += "io.chrisdavenport" %% "cats-scalacheck" % "<version>"

Getting Started

import org.scalacheck._
import org.scalacheck.cats.implicits._
import cats.Applicative
import cats.implicits._

val apComposition: Gen[(Int, String)] = Applicative[Gen].product(



  • Alternative[Gen]
  • Monad[Gen]
  • FunctorFilter[Gen]
  • Monoid[A] => Monoid[Gen[A]]
  • Semigroup[A] => Semigroup[Gen[A]]


  • ContravariantSemigroupal[Cogen]
  • MonoidK[Cogen]

Why in org.scalacheck

This was necessary because scalacheck makes some of their instances package private that are required to roll these meaningfully.

You can’t perform that action at this time.