arrow-kt / arrow-incubator

Λrrow Incubator is part of Λrrow, a functional companion to Kotlin's Standard Library
http://arrow-kt.io
Other
20 stars 3 forks source link

Error when sync release/0.11.0 with master #60

Closed github-actions[bot] closed 4 years ago

github-actions[bot] commented 4 years ago

Error log

https://github.com/arrow-kt/arrow-incubator/commit/703e937fc752928286d9a05cb3d977016d25c543/checks

Conflicts

diff --cc arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/eithert.kt
index a5e6ccc,d0acb87..0000000
--- a/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/eithert.kt
+++ b/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/eithert.kt
@@@ -119,14 -119,14 +119,19 @@@ interface EitherTConcurrent<L, F> : Con

    override fun ASF(): Async<F> = CF()

-   override fun dispatchers(): Dispatchers<EitherTPartialOf<F, L>> =
-     CF().dispatchers() as Dispatchers<EitherTPartialOf<F, L>>
+   override fun dispatchers(): Dispatchers<EitherTPartialOf<L, F>> =
+     CF().dispatchers() as Dispatchers<EitherTPartialOf<L, F>>

++<<<<<<< HEAD
 +  override fun <A> cancellable(k: ((Either<Throwable, A>) -> Unit) -> CancelToken<EitherTPartialOf<F, L>>): EitherT<F, L, A> = CF().run {
 +    EitherT.liftF(this, cancellable { cb -> k(cb).value().map { Unit } })
++=======
+   override fun <A> cancelable(k: ((Either<Throwable, A>) -> Unit) -> CancelToken<EitherTPartialOf<L, F>>): EitherT<L, F, A> = CF().run {
+     EitherT.liftF(this, cancelable { cb -> k(cb).value().map { Unit } })
++>>>>>>> origin/master
    }

-   override fun <A> EitherTOf<F, L, A>.fork(ctx: CoroutineContext): EitherT<F, L, Fiber<EitherTPartialOf<F, L>, A>> = CF().run {
+   override fun <A> EitherTOf<L, F, A>.fork(ctx: CoroutineContext): EitherT<L, F, Fiber<EitherTPartialOf<L, F>, A>> = CF().run {
      EitherT.liftF(this, value().fork(ctx).map(::fiberT))
    }

@@@ -201,13 -201,14 +206,21 @@@ fun <L, F> EitherT.Companion.concurrent
      override fun CF(): Concurrent<F> = CF
    }

- fun <F, L> EitherT.Companion.timer(CF: Concurrent<F>): Timer<EitherTPartialOf<F, L>> =
-   Timer(concurrent<F, L>(CF))
+ fun <L, F> EitherT.Companion.timer(CF: Concurrent<F>): Timer<EitherTPartialOf<L, F>> =
+   Timer(concurrent<L, F>(CF))

++<<<<<<< HEAD
 +interface EitherTMonadIO<F, L> : MonadIO<EitherTPartialOf<F, L>>, EitherTMonad<F, L> {
 +  fun FIO(): MonadIO<F>
 +  override fun MF(): Monad<F> = FIO()
 +  override fun <A> IO<Nothing, A>.liftIO(): Kind<EitherTPartialOf<F, L>, A> = FIO().run {
++=======
+ @extension
+ interface EitherTMonadIO<L, F> : MonadIO<EitherTPartialOf<L, F>>, EitherTMonad<L, F> {
+   fun FIO(): MonadIO<F>
+   override fun MF(): Monad<F> = FIO()
+   override fun <A> IO<A>.liftIO(): Kind<EitherTPartialOf<L, F>, A> = FIO().run {
++>>>>>>> origin/master
      EitherT.liftF(this, liftIO())
    }
  }
diff --cc arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/kleisli.kt
index 0d45817,fed94b4..0000000
--- a/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/kleisli.kt
+++ b/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/kleisli.kt
@@@ -52,8 -52,8 +52,13 @@@ interface KleisliBracket<D, F, E> : Bra
      }
    }

++<<<<<<< HEAD
 +  override fun <A> KleisliOf<F, R, A>.uncancellable(): Kleisli<F, R, A> = BF().run {
 +    Kleisli { r -> this@uncancellable.run(r).uncancellable() }
++=======
+   override fun <A> KleisliOf<D, F, A>.uncancelable(): Kleisli<D, F, A> = BF().run {
+     Kleisli { r -> this@uncancelable.run(r).uncancelable() }
++>>>>>>> origin/master
    }
  }

@@@ -77,8 -77,8 +82,13 @@@ interface KleisliMonadDefer<D, F> : Mon
      Kleisli { d -> defer { run(d).flatMap { a -> f(a).run(d) } } }
    }

++<<<<<<< HEAD
 +  override fun <A> KleisliOf<F, R, A>.uncancellable(): Kleisli<F, R, A> = MDF().run {
 +    Kleisli { d -> defer { run(d).uncancellable() } }
++=======
+   override fun <A> KleisliOf<D, F, A>.uncancelable(): Kleisli<D, F, A> = MDF().run {
+     Kleisli { d -> defer { run(d).uncancelable() } }
++>>>>>>> origin/master
    }
  }

@@@ -116,14 -116,14 +126,19 @@@ interface KleisliConcurrent<D, F> : Con
    fun CF(): Concurrent<F>
    override fun ASF(): Async<F> = CF()

-   override fun dispatchers(): Dispatchers<KleisliPartialOf<F, R>> =
-     CF().dispatchers() as Dispatchers<KleisliPartialOf<F, R>>
+   override fun dispatchers(): Dispatchers<KleisliPartialOf<D, F>> =
+     CF().dispatchers() as Dispatchers<KleisliPartialOf<D, F>>

++<<<<<<< HEAD
 +  override fun <A> cancellable(k: ((Either<Throwable, A>) -> Unit) -> CancelToken<KleisliPartialOf<F, R>>): Kleisli<F, R, A> = CF().run {
 +    Kleisli { d -> cancellable { cb -> k(cb).run(d).map { Unit } } }
++=======
+   override fun <A> cancelable(k: ((Either<Throwable, A>) -> Unit) -> CancelToken<KleisliPartialOf<D, F>>): Kleisli<D, F, A> = CF().run {
+     Kleisli { d -> cancelable { cb -> k(cb).run(d).map { Unit } } }
++>>>>>>> origin/master
    }

-   override fun <A> KleisliOf<F, R, A>.fork(ctx: CoroutineContext): Kleisli<F, R, Fiber<KleisliPartialOf<F, R>, A>> = CF().run {
+   override fun <A> KleisliOf<D, F, A>.fork(ctx: CoroutineContext): Kleisli<D, F, Fiber<KleisliPartialOf<D, F>, A>> = CF().run {
      Kleisli { r -> run(r).fork(ctx).map(::fiberT) }
    }

@@@ -179,13 -179,14 +194,21 @@@ fun <D, F> Kleisli.Companion.concurrent
      override fun CF(): Concurrent<F> = CF
    }

- fun <F, R> Kleisli.Companion.timer(CF: Concurrent<F>): Timer<KleisliPartialOf<F, R>> =
-   Timer(concurrent<F, R>(CF))
+ fun <D, F> Kleisli.Companion.timer(CF: Concurrent<F>): Timer<KleisliPartialOf<D, F>> =
+   Timer(concurrent<D, F>(CF))

++<<<<<<< HEAD
 +interface KleisliMonadIO<F, R> : MonadIO<KleisliPartialOf<F, R>>, KleisliMonad<F, R> {
 +  fun FIO(): MonadIO<F>
 +  override fun MF(): Monad<F> = FIO()
 +  override fun <A> IO<Nothing, A>.liftIO(): Kind<KleisliPartialOf<F, R>, A> = FIO().run {
++=======
+ @extension
+ interface KleisliMonadIO<D, F> : MonadIO<KleisliPartialOf<D, F>>, KleisliMonad<D, F> {
+   fun FIO(): MonadIO<F>
+   override fun MF(): Monad<F> = FIO()
+   override fun <A> IO<A>.liftIO(): Kind<KleisliPartialOf<D, F>, A> = FIO().run {
++>>>>>>> origin/master
      Kleisli.liftF(liftIO())
    }
  }
diff --cc arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/statet.kt
index d68ebde,bc49c4d..0000000
--- a/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/statet.kt
+++ b/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/statet.kt
@@@ -99,10 -99,11 +99,18 @@@ interface StateTAsyncInstane<S, F> : As
    }
  }

++<<<<<<< HEAD
 +interface StateTMonadIO<F, S> : MonadIO<StateTPartialOf<F, S>>, StateTMonad<F, S> {
 +  fun FIO(): MonadIO<F>
 +  override fun MF(): Monad<F> = FIO()
 +  override fun <A> IO<Nothing, A>.liftIO(): Kind<StateTPartialOf<F, S>, A> = FIO().run {
++=======
+ @extension
+ interface StateTMonadIO<S, F> : MonadIO<StateTPartialOf<S, F>>, StateTMonad<S, F> {
+   fun FIO(): MonadIO<F>
+   override fun MF(): Monad<F> = FIO()
+   override fun <A> IO<A>.liftIO(): Kind<StateTPartialOf<S, F>, A> = FIO().run {
++>>>>>>> origin/master
      StateT.liftF(this, liftIO())
    }
  }
diff --cc arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/writert.kt
index b42ec2d,2b2cee1..0000000
--- a/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/writert.kt
+++ b/arrow-fx-mtl/src/main/kotlin/arrow/fx/mtl/writert.kt
@@@ -106,15 -106,15 +106,20 @@@ interface WriterTConcurrent<W, F> : Con

    override fun AS(): Async<F> = CF()

-   override fun dispatchers(): Dispatchers<WriterTPartialOf<F, W>> =
-     CF().dispatchers() as Dispatchers<WriterTPartialOf<F, W>>
+   override fun dispatchers(): Dispatchers<WriterTPartialOf<W, F>> =
+     CF().dispatchers() as Dispatchers<WriterTPartialOf<W, F>>

++<<<<<<< HEAD
 +  override fun <A> cancellable(k: ((Either<Throwable, A>) -> Unit) -> CancelToken<WriterTPartialOf<F, W>>): WriterT<F, W, A> = CF().run {
 +    WriterT.liftF(cancellable { cb -> k(cb).value().unit() }, MM(), this)
++=======
+   override fun <A> cancelable(k: ((Either<Throwable, A>) -> Unit) -> CancelToken<WriterTPartialOf<W, F>>): WriterT<W, F, A> = CF().run {
+     WriterT.liftF(cancelable { cb -> k(cb).value().unit() }, MM(), this)
++>>>>>>> origin/master
    }

-   override fun <A> WriterTOf<F, W, A>.fork(ctx: CoroutineContext): WriterT<F, W, Fiber<WriterTPartialOf<F, W>, A>> = CF().run {
-     val fork: Kind<F, Tuple2<W, Fiber<WriterTPartialOf<F, W>, A>>> = value().fork(ctx).map { fiber: Fiber<F, Tuple2<W, A>> ->
+   override fun <A> WriterTOf<W, F, A>.fork(ctx: CoroutineContext): WriterT<W, F, Fiber<WriterTPartialOf<W, F>, A>> = CF().run {
+     val fork: Kind<F, Tuple2<W, Fiber<WriterTPartialOf<W, F>, A>>> = value().fork(ctx).map { fiber: Fiber<F, Tuple2<W, A>> ->
        Tuple2(MM().empty(), fiberT(fiber))
      }
      WriterT(fork)
@@@ -163,14 -163,15 +168,23 @@@ fun <W, F> WriterT.Companion.concurrent
      override fun MM(): Monoid<W> = MM
    }

- fun <F, W> WriterT.Companion.timer(CF: Concurrent<F>, MM: Monoid<W>): Timer<WriterTPartialOf<F, W>> =
+ fun <W, F> WriterT.Companion.timer(CF: Concurrent<F>, MM: Monoid<W>): Timer<WriterTPartialOf<W, F>> =
    Timer(concurrent(CF, MM))

++<<<<<<< HEAD
 +interface WriterTMonadIO<F, W> : MonadIO<WriterTPartialOf<F, W>>, WriterTMonad<F, W> {
 +  fun FIO(): MonadIO<F>
 +  override fun MF(): Monad<F> = FIO()
 +  override fun MM(): Monoid<W>
 +  override fun <A> IO<Nothing, A>.liftIO(): Kind<WriterTPartialOf<F, W>, A> = FIO().run {
++=======
+ @extension
+ interface WriterTMonadIO<W, F> : MonadIO<WriterTPartialOf<W, F>>, WriterTMonad<W, F> {
+   fun FIO(): MonadIO<F>
+   override fun MF(): Monad<F> = FIO()
+   override fun MM(): Monoid<W>
+   override fun <A> IO<A>.liftIO(): Kind<WriterTPartialOf<W, F>, A> = FIO().run {
++>>>>>>> origin/master
      WriterT.liftF(liftIO(), MM(), this)
    }
  }
diff --cc arrow-mtl-data/src/test/kotlin/arrow/mtl/EitherTTest.kt
index 98a66c9,fcfcaef..0000000
--- a/arrow-mtl-data/src/test/kotlin/arrow/mtl/EitherTTest.kt
+++ b/arrow-mtl-data/src/test/kotlin/arrow/mtl/EitherTTest.kt
@@@ -49,11 -49,11 +49,15 @@@ import io.kotlintest.properties.forAl
  class EitherTTest : UnitSpec() {

    init {
-     val idEQK: EqK<Kind<Kind<ForEitherT, ForId>, Int>> = EitherT.eqK(Id.eqK(), Int.eq())
+     val idEQK: EqK<Kind<Kind<ForEitherT, Int>, ForId>> = EitherT.eqK(Id.eqK(), Int.eq())

++<<<<<<< HEAD
 +    val ioEQK: EqK<Kind<Kind<ForEitherT, IOPartialOf<Nothing>>, String>> = EitherT.eqK(IO.eqK(), Eq.any())
++=======
+     val ioEQK: EqK<Kind<Kind<ForEitherT, String>, ForIO>> = EitherT.eqK(IO.eqK(), Eq.any())
++>>>>>>> origin/master

-     val constEQK: EqK<Kind<Kind<ForEitherT, Kind<ForConst, Int>>, Int>> = EitherT.eqK(Const.eqK(Int.eq()), Int.eq())
+     val constEQK: EqK<Kind<Kind<ForEitherT, Int>, Kind<ForConst, Int>>> = EitherT.eqK(Const.eqK(Int.eq()), Int.eq())

      testLaws(
        DivisibleLaws.laws(
@@@ -68,7 -68,7 +72,11 @@@
          idEQK
        ),

++<<<<<<< HEAD
 +      ConcurrentLaws.laws<EitherTPartialOf<IOPartialOf<Nothing>, String>>(
++=======
+       ConcurrentLaws.laws<EitherTPartialOf<String, ForIO>>(
++>>>>>>> origin/master
          EitherT.concurrent(IO.concurrent()),
          EitherT.timer(IO.concurrent()),
          EitherT.functor(IO.functor()),
diff --cc arrow-mtl-data/src/test/kotlin/arrow/mtl/KleisliTest.kt
index 0d63c00,99116fa..0000000
--- a/arrow-mtl-data/src/test/kotlin/arrow/mtl/KleisliTest.kt
+++ b/arrow-mtl-data/src/test/kotlin/arrow/mtl/KleisliTest.kt
@@@ -71,22 -48,31 +48,39 @@@ class KleisliTest : UnitSpec() 
        }
      }

-     val optionEQK = Kleisli.eqK(Option.eqK(), 0)
+     fun <D, F> Kleisli.Companion.eqK(EQKF: EqK<F>, d: D) = object : EqK<KleisliPartialOf<D, F>> {
+       override fun <A> Kind<KleisliPartialOf<D, F>, A>.eqK(other: Kind<KleisliPartialOf<D, F>, A>, EQ: Eq<A>): Boolean =
+         (this.fix() to other.fix()).let {
+           val ls = it.first.run(d)
+           val rs = it.second.run(d)
+ 
+           EQKF.liftEq(EQ).run {
+             ls.eqv(rs)
+           }
+         }
+     }

++<<<<<<< HEAD
 +    val ioEQK: EqK<Kind<Kind<ForKleisli, IOPartialOf<Nothing>>, Int>> = Kleisli.eqK(IO.eqK(), 1)
++=======
+     val optionEQK = Kleisli.eqK(Option.eqK(), 0)
++>>>>>>> origin/master

-     val tryEQK: EqK<Kind<Kind<ForKleisli, ForTry>, Int>> =
-       Kleisli.eqK(Try.eqK(), 1)
+     val ioEQK: EqK<Kind<Kind<ForKleisli, Int>, ForIO>> = Kleisli.eqK(IO.eqK(), 1)

-     val constEQK: EqK<Kind<Kind<ForKleisli, Kind<ForConst, Int>>, Int>> = Kleisli.eqK(Const.eqK(Int.eq()), 1)
+     val constEQK: EqK<Kind<Kind<ForKleisli, Int>, Kind<ForConst, Int>>> = Kleisli.eqK(Const.eqK(Int.eq()), 1)

      testLaws(
        AlternativeLaws.laws(
-         Kleisli.alternative<ForOption, Int>(Option.alternative()),
-         genK<ForOption, Int>(Option.genK()),
+         Kleisli.alternative<Int, ForOption>(Option.alternative()),
+         genK<Int, ForOption>(Option.genK()),
          optionEQK
        ),
++<<<<<<< HEAD
 +      ConcurrentLaws.laws<KleisliPartialOf<IOPartialOf<Nothing>, Int>>(
++=======
+       ConcurrentLaws.laws<KleisliPartialOf<Int, ForIO>>(
++>>>>>>> origin/master
          Kleisli.concurrent(IO.concurrent()),
          Kleisli.timer(IO.concurrent()),
          Kleisli.functor(IO.functor()),
diff --cc arrow-mtl-data/src/test/kotlin/arrow/mtl/StateTTests.kt
index 8bde840,c4b8439..0000000
--- a/arrow-mtl-data/src/test/kotlin/arrow/mtl/StateTTests.kt
+++ b/arrow-mtl-data/src/test/kotlin/arrow/mtl/StateTTests.kt
@@@ -44,24 -38,18 +38,31 @@@ import io.kotlintest.properties.Ge

  class StateTTests : UnitSpec() {

++<<<<<<< HEAD
 +  val M: StateTMonadState<ForTry, Int> = StateT.monadState(Try.monad())
 +
 +  val optionStateEQK: EqK<StateTPartialOf<ForOption, Int>> = StateT.eqK(Option.eqK(), Int.eq(), Option.monad(), 1)
 +  val ioStateEQK: EqK<StateTPartialOf<IOPartialOf<Nothing>, Int>> = StateT.eqK(IO.eqK(), Int.eq(), IO.monad(), 1)
 +  val tryStateEqK: EqK<Kind<Kind<ForStateT, ForTry>, Int>> = StateT.eqK(Try.eqK(), Int.eq(), Try.monad(), 1)
 +
++=======
++>>>>>>> origin/master
    init {
      testLaws(
-       MonadStateLaws.laws(
-         M,
-         StateT.functor<ForTry, Int>(Try.functor()),
-         StateT.applicative<ForTry, Int>(Try.monad()),
-         StateT.monad<ForTry, Int>(Try.monad()),
-         StateT.genK(Try.genK(), Gen.int()),
-         tryStateEqK
+       MonadStateLaws.laws<StateTPartialOf<Int, ForIO>>(
+         StateT.monadState(IO.monad()),
+         StateT.functor(IO.functor()),
+         StateT.applicative(IO.monad()),
+         StateT.monad(IO.monad()),
+         StateT.genK(IO.genK(), Gen.int()),
+         StateT.eqK(IO.eqK(), Int.eq(), IO.monad(), 0)
        ),

++<<<<<<< HEAD
 +      AsyncLaws.laws<StateTPartialOf<IOPartialOf<Nothing>, Int>>(
++=======
+       AsyncLaws.laws<StateTPartialOf<Int, ForIO>>(
++>>>>>>> origin/master
          StateT.async(IO.async()),
          StateT.functor(IO.functor()),
          StateT.applicative(IO.monad()),
diff --cc arrow-mtl-data/src/test/kotlin/arrow/mtl/WriterTTest.kt
index 82cec54,90ae643..0000000
--- a/arrow-mtl-data/src/test/kotlin/arrow/mtl/WriterTTest.kt
+++ b/arrow-mtl-data/src/test/kotlin/arrow/mtl/WriterTTest.kt
@@@ -54,13 -56,13 +56,17 @@@ import io.kotlintest.properties.Ge

  class WriterTTest : UnitSpec() {

++<<<<<<< HEAD
 +  fun ioEQK(): WriterTEqK<IOPartialOf<Nothing>, ListK<Int>> = WriterT.eqK(IO.eqK(), ListK.eq(Int.eq()))
++=======
+   fun ioEQK(): WriterTEqK<ListK<Int>, ForIO> = WriterT.eqK(IO.eqK(), ListK.eq(Int.eq()))
++>>>>>>> origin/master

-   fun optionEQK(): WriterTEqK<ForOption, ListK<Int>> = WriterT.eqK(Option.eqK(), ListK.eq(Int.eq()))
+   fun optionEQK(): WriterTEqK<ListK<Int>, ForOption> = WriterT.eqK(Option.eqK(), ListK.eq(Int.eq()))

-   fun constEQK(): WriterTEqK<ConstPartialOf<Int>, ListK<Int>> = WriterT.eqK(Const.eqK(Int.eq()), ListK.eq(Int.eq()))
+   fun constEQK(): WriterTEqK<ListK<Int>, ConstPartialOf<Int>> = WriterT.eqK(Const.eqK(Int.eq()), ListK.eq(Int.eq()))

-   fun listEQK(): WriterTEqK<ForListK, ListK<Int>> = WriterT.eqK(ListK.eqK(), ListK.eq(Int.eq()))
+   fun listEQK(): WriterTEqK<ListK<Int>, ForListK> = WriterT.eqK(ListK.eqK(), ListK.eq(Int.eq()))

    init {

@@@ -75,12 -84,12 +88,18 @@@
          WriterT.genK(Const.genK(Gen.int()), Gen.list(Gen.int()).map { it.k() }),
          constEQK()
        ),
 -      ConcurrentLaws.laws(
 -        WriterT.concurrent(IO.concurrent(), ListK.monoid<Int>()),
 +      ConcurrentLaws.laws<WriterTPartialOf<IOPartialOf<Nothing>, ListK<Int>>>(
 +        WriterT.concurrent(IO.concurrent(), ListK.monoid()),
          WriterT.timer(IO.concurrent(), ListK.monoid<Int>()),
++<<<<<<< HEAD
 +        WriterT.functor(IO.functor()),
 +        WriterT.applicative(IO.applicative(), ListK.monoid()),
 +        WriterT.monad(IO.monad(), ListK.monoid()),
++=======
+         WriterT.functor<ListK<Int>, ForIO>(IO.functor()),
+         WriterT.applicative(IO.applicative(), ListK.monoid<Int>()),
+         WriterT.monad(IO.monad(), ListK.monoid<Int>()),
++>>>>>>> origin/master
          WriterT.genK(IO.genK(), Gen.list(Gen.int()).map { it.k() }),
          ioEQK()
        ),
aballano commented 4 years ago

Should be fixed, otherwise it'll be reported again