Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links "LawTesting.md" in FAQ and TypeClasses pages #1985

Merged
merged 2 commits into from Oct 21, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/src/main/tut/faq.md
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
@@ -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
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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I should've caught this earlier. This link probably has an extra typeclasses in path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kailuowang The path is good. I've tested it.
Without the typeclasses prefix the URL formed is: /cats/lawtesting.html (which is broken). The original .md is placed in typeclasses/lawtesting.md.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh cool, thanks for testing it.


## Type classes in cats

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