Skip to content

Commit

Permalink
Links "LawTesting.md" in FAQ and TypeClasses pages (typelevel#1985)
Browse files Browse the repository at this point in the history
* Links "LawTesting.md" in FAQ and TypeClasses pages

* Rewrites law testing title in FAQ
  • Loading branch information
AlejandroME authored and kailuowang committed Oct 23, 2017
1 parent 2d00d79 commit 8931e60
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/src/main/tut/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ position: 40
* [What does `macro Ops` do? What is `cats.macros.Ops`?](#machinist)
* [What is `tailRecM`?](#tailrecm)
* [What does this symbol mean?](#symbol)
* [How can I test instances against their type classes' laws?](#law-testing)
* [How can I help?](#contributing)

## <a id="what-imports" href="#what-imports"></a>What imports do I need?
Expand Down Expand Up @@ -232,6 +233,10 @@ All other symbols can be imported with `import cats.implicits._`
| `fa >> fb` (Deprecated) | followed by | | `FlatMap[F[_]]` | `followedBy(fa: F[A])(fb: F[B]): F[B]` |
| `fa << fb` (Deprecated) | for effect | | `FlatMap[F[_]]` | `forEffect(fa: F[A])(fb: F[B]): F[A]` |

## <a id="law-testing" href="#law-testing"></a>How can I test instances against their type classes' laws?

You can find more information [here](typeclasses/lawtesting.html).

## <a id="contributing" href="#contributing"></a>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:
Expand Down
6 changes: 6 additions & 0 deletions docs/src/main/tut/typeclasses/lawtesting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
layout: docs
title: "Law Testing"
section: "typeclasses"
---

# Law testing

[Laws](https://typelevel.org/cats/typeclasses.html#laws) are an important part of cats.
Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/tut/typeclasses/typeclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ val result = Monoid[Int].combine(sumLeft, sumRight)
Cats provides laws for type classes via the `kernel-laws` and `laws` modules which makes law checking
type class instances easy.

You can find out more about law testing [here](typeclasses/lawtesting.html).

## Type classes in cats

<img src="https://cdn.rawgit.com/tpolecat/cats-infographic/master/cats.svg" alt="infographic" style="width: 100%;"/>
Expand Down

0 comments on commit 8931e60

Please sign in to comment.