Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Fix EitherT generator to compile with latest changes #54

Merged
merged 1 commit into from
Feb 27, 2020
Merged
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
6 changes: 3 additions & 3 deletions arrow-fx-test/src/main/kotlin/arrow/test/generators/GenK.kt
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ fun <A> Const.Companion.genK(genA: Gen<A>) = object : GenK<ConstPartialOf<A>> {
}
}

fun <F, L> EitherT.Companion.genK(genkF: GenK<F>, genL: Gen<L>) =
object : GenK<EitherTPartialOf<F, L>> {
override fun <R> genK(gen: Gen<R>): Gen<Kind<EitherTPartialOf<F, L>, R>> =
fun <L, F> EitherT.Companion.genK(genkF: GenK<F>, genL: Gen<L>) =
object : GenK<EitherTPartialOf<L, F>> {
override fun <R> genK(gen: Gen<R>): Gen<Kind<EitherTPartialOf<L, F>, R>> =
genkF.genK(Gen.either(genL, gen)).map {
EitherT(it)
}
Expand Down