Skip to content

Commit

Permalink
Merge pull request #4424 from lenguyenthanh/patch-1
Browse files Browse the repository at this point in the history
Bump versions in law testing doc
  • Loading branch information
armanbilge authored May 18, 2023
2 parents 7499220 + 4624987 commit 9012ebf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/typeclasses/lawtesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ To test type class laws from Cats against your instances, you need to add a `cat
## Getting started

First up, you will need to specify dependencies on `cats-laws` in your `build.sbt` file.
To make things easier, we'll also include the `scalacheck-shapeless` library in this tutorial, so we don't have to manually write instances for ScalaCheck's `Arbitrary`.

```scala
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-laws" % "2.0.0" % Test,
"com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.3" % Test
"org.typelevel" %% "cats-laws" % "@VERSION@" % Test,
)
```

Expand Down Expand Up @@ -58,7 +56,7 @@ For simplicity we'll just use `Eq.fromUniversalEquals`:
implicit def eqTree[A: Eq]: Eq[Tree[A]] = Eq.fromUniversalEquals
```
ScalaCheck requires `Arbitrary` instances for data types being tested. We have defined an `Arbitrary` instance for `Tree` here,
but you won't need it if you import `org.scalacheck.ScalacheckShapeless._`).
if you use Scala 2, you can avoid writing it manually with [scalacheck-shapeless](https://github.com/alexarchambault/scalacheck-shapeless).

```scala mdoc:silent

Expand Down

0 comments on commit 9012ebf

Please sign in to comment.