-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1211 from peterneyens/contravariant-instances
Add Contravariant instance for Eq and test Show instance.
- Loading branch information
Showing
5 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package cats | ||
package tests | ||
|
||
import cats.functor.Contravariant | ||
import cats.laws.discipline.arbitrary._ | ||
import cats.laws.discipline.{ContravariantTests, SerializableTests} | ||
import cats.laws.discipline.eq._ | ||
|
||
class ShowTests extends CatsSuite { | ||
checkAll("Contravariant[Show]", ContravariantTests[Show].contravariant[Int, Int, Int]) | ||
checkAll("Contravariant[Show]", SerializableTests.serializable(Contravariant[Show])) | ||
} |