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

CU-ev2gzp Deprecate deprecated typeclass laws #2252

Merged
merged 2 commits into from
Feb 26, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.Ior
import arrow.core.extensions.eq
import arrow.core.extensions.ior.eq.eq
Expand All @@ -12,6 +13,7 @@ import arrow.typeclasses.Foldable
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object AlignLaws {

val iorEq = Ior.eq(Int.eq(), Int.eq())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
import arrow.core.test.generators.functionAToB
Expand All @@ -10,6 +11,7 @@ import arrow.typeclasses.EqK
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object AlternativeLaws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.Either
import arrow.core.Left
import arrow.core.Right
Expand All @@ -19,6 +20,7 @@ import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll
import kotlinx.coroutines.runBlocking

@Deprecated(KindDeprecation)
object ApplicativeErrorLaws {

fun <F> laws(AE: ApplicativeError<F, Throwable>, GENK: GenK<F>, EQK: EqK<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.Eval
import arrow.core.Tuple2
import arrow.core.Tuple3
Expand All @@ -18,6 +19,7 @@ import arrow.typeclasses.Functor
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object ApplicativeLaws {

fun <F> laws(A: Applicative<F>, GENK: GenK<F>, EQK: EqK<F>): List<Law> = laws(A, A, GENK, EQK)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package arrow.core.test.laws

import arrow.Kind
import arrow.Kind2
import arrow.KindDeprecation
import arrow.core.ForListK
import arrow.core.ListK
import arrow.core.extensions.eq
Expand All @@ -17,6 +18,7 @@ import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll
import kotlin.math.abs

@Deprecated(KindDeprecation)
object BicrosswalkLaws {

fun <T> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind2
import arrow.KindDeprecation
import arrow.core.Eval
import arrow.core.extensions.eq
import arrow.core.extensions.monoid
Expand All @@ -12,6 +13,7 @@ import arrow.typeclasses.Eq
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object BifoldableLaws {

fun <F> laws(BF: Bifoldable<F>, GENK: GenK2<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind2
import arrow.KindDeprecation
import arrow.core.andThen
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK2
Expand All @@ -11,6 +12,7 @@ import arrow.typeclasses.EqK2
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object BifunctorLaws {

fun <F> laws(BF: Bifunctor<F>, GENK: GenK2<F>, EQK: EqK2<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
import arrow.typeclasses.Apply
Expand All @@ -14,6 +15,7 @@ import arrow.typeclasses.Selective
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object BimonadLaws {

private fun <F> bimonadLaws(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package arrow.core.test.laws

import arrow.Kind
import arrow.Kind2
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK2
import arrow.core.test.generators.functionAToB
Expand All @@ -15,6 +16,7 @@ import arrow.typeclasses.EqK2
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object BitraverseLaws {

fun <F> laws(BT: Bitraverse<F>, GENK: GenK2<F>, EQK: EqK2<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind2
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK2
import arrow.typeclasses.Category
Expand All @@ -9,6 +10,7 @@ import arrow.typeclasses.EqK2
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object CategoryLaws {

fun <F> laws(C: Category<F>, GENK: GenK2<F>, EQK: EqK2<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
import arrow.core.test.generators.functionAToB
Expand All @@ -10,6 +11,7 @@ import arrow.typeclasses.EqK
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object ComonadLaws {

fun <F> laws(CM: Comonad<F>, GENK: GenK<F>, EQK: EqK<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.compose
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
Expand All @@ -11,6 +12,7 @@ import arrow.typeclasses.EqK
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object ContravariantLaws {

fun <F> laws(CF: Contravariant<F>, GENK: GenK<F>, EQK: EqK<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.ForListK
import arrow.core.ListK
import arrow.core.extensions.eq
Expand All @@ -16,6 +17,7 @@ import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll
import kotlin.math.abs

@Deprecated(KindDeprecation)
object CrosswalkLaws {

fun <T> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.Tuple2
import arrow.core.extensions.eq
import arrow.core.toT
Expand All @@ -11,6 +12,7 @@ import arrow.typeclasses.EqK
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object DivideLaws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
import arrow.typeclasses.Divisible
Expand All @@ -9,6 +10,7 @@ import arrow.typeclasses.EqK
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object DivisibleLaws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package arrow.core.test.laws

import arrow.Kind2
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK2
import arrow.typeclasses.EqK2
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object EqK2Laws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
import arrow.typeclasses.EqK
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object EqKLaws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package arrow.core.test.laws

import arrow.typeclasses.Eq
import arrow.typeclasses.EqDeprecation
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(EqDeprecation)
object EqLaws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.Either
import arrow.core.Eval
import arrow.core.Eval.Companion.always
Expand Down Expand Up @@ -46,6 +47,7 @@ import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll
import io.kotlintest.shouldBe

@Deprecated(KindDeprecation)
object FoldableLaws {

fun <F> laws(FF: Foldable<F>, GENK: GenK<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.None
import arrow.core.Option
import arrow.core.Some
Expand All @@ -17,6 +18,7 @@ import arrow.typeclasses.FunctorFilter
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object FunctorFilterLaws {

fun <F> laws(FFF: FunctorFilter<F>, GENK: GenK<F>, EQK: EqK<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.Option
import arrow.core.Some
import arrow.core.Tuple2
Expand All @@ -17,6 +18,7 @@ import arrow.typeclasses.Functor
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object FunctorLaws {

private val fproductIdentityTupleEq = Tuple2.eq(Int.eq(), String.eq())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ package arrow.core.test.laws

import arrow.typeclasses.Eq
import arrow.typeclasses.Hash
import arrow.typeclasses.HashDeprecation
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(HashDeprecation)
object HashLaws {

fun <F> laws(HF: Hash<F>, G: Gen<F>, EQ: Eq<F>): List<Law> =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.compose
import arrow.core.extensions.eq
import arrow.core.identity
Expand All @@ -12,6 +13,7 @@ import arrow.typeclasses.Invariant
import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll

@Deprecated(KindDeprecation)
object InvariantLaws {

fun <F> laws(IF: Invariant<F>, GENK: GenK<F>, EQK: EqK<F>): List<Law> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package arrow.core.test.laws

import arrow.KindDeprecation
import arrow.core.test.generators.GenK
import arrow.typeclasses.Apply
import arrow.typeclasses.EqK
import arrow.typeclasses.Functor
import arrow.typeclasses.MonadCombine
import arrow.typeclasses.Selective

@Deprecated(KindDeprecation)
object MonadCombineLaws {

fun <F> laws(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arrow.core.test.laws

import arrow.Kind
import arrow.KindDeprecation
import arrow.core.extensions.eq
import arrow.core.test.generators.GenK
import arrow.core.test.generators.applicative
Expand All @@ -19,6 +20,7 @@ import io.kotlintest.properties.Gen
import io.kotlintest.properties.forAll
import io.kotlintest.shouldThrowAny

@Deprecated(KindDeprecation)
object MonadErrorLaws {

private fun <F> monadErrorLaws(M: MonadError<F, Throwable>, EQK: EqK<F>): List<Law> {
Expand Down
Loading