-
-
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.
Add Const and Validated instances and derivation from SemigroupK and …
…Apply
- Loading branch information
Showing
12 changed files
with
99 additions
and
5 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
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,14 @@ | ||
package cats.tests | ||
|
||
import cats.Align | ||
import cats.kernel.laws.discipline.SemigroupTests | ||
|
||
class AlignSuite extends CatsSuite { | ||
{ | ||
val optionSemigroup = Align.semigroup[Option, Int] | ||
checkAll("Align[Option].semigroup", SemigroupTests[Option[Int]](optionSemigroup).semigroup) | ||
|
||
val listSemigroup = Align.semigroup[List, String] | ||
checkAll("Align[List].semigroup", SemigroupTests[List[String]](listSemigroup).semigroup) | ||
} | ||
} |
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,20 @@ | ||
package cats.tests | ||
|
||
import cats.SemigroupK | ||
import cats.data.{Chain, Validated} | ||
import cats.laws.discipline.AlignTests | ||
import cats.laws.discipline.arbitrary._ | ||
|
||
class SemigroupKSuite extends CatsSuite { | ||
{ | ||
implicit val listwrapperSemigroupK = ListWrapper.alternative | ||
implicit val listwrapperAlign = SemigroupK.align[ListWrapper] | ||
checkAll("SemigroupK[ListWrapper].align", AlignTests[ListWrapper].align[Int, Int, Int, Int]) | ||
|
||
implicit val validatedAlign = SemigroupK.align[Validated[String, *]] | ||
checkAll("SemigroupK[Validated].align", AlignTests[Validated[String, *]].align[Int, Int, Int, Int]) | ||
|
||
implicit val chainAlign = SemigroupK.align[Chain] | ||
checkAll("SemigroupK[Chain].align", AlignTests[Chain].align[Int, Int, Int, Int]) | ||
} | ||
} |
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