Skip to content

Commit b113cae

Browse files
author
Oleg Nizhnik
committed
smallest fixes
1 parent f78f4cb commit b113cae

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Publish._, Dependencies._
22
import com.typesafe.sbt.SbtGit.git
33

4-
val libVersion = "0.6.3"
4+
val libVersion = "0.7.0"
55

66
lazy val setMinorVersion = minorVersion := {
77
CrossVersion.partialVersion(scalaVersion.value) match {

concurrent/src/main/scala/tofu/concurrent/Agent.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package tofu.concurrent
22
import cats.{FlatMap, Monad}
33
import cats.effect.concurrent.{Ref, Semaphore}
44
import tofu.Fire
5-
import tofu.higherKind.{RepresentableK, derived}
65
import tofu.syntax.fire._
76
import tofu.syntax.monadic._
87

higherKindCore/src/main/scala/tofu/higherKind/RepresentableK.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object RepresentableK extends RepresentableKInstanceChain[RepresentableK] {
5252

5353
trait RepresentableKInstanceChain[TC[u[_[_]]] >: RepresentableK[u]] {
5454
private[this] def idKRepresentableInst[A]: RepresentableK[IdK[A]#λ] = new RepresentableK[IdK[A]#λ] {
55-
def tabulate[F[_]](hom: RepK[IdK[A]#λ, *] ~> F): F[A] = hom(RepK.apply(x => x))
55+
def tabulate[F[_]](hom: RepK[IdK[A]#λ, *] ~> F): F[A] = hom(RepK[IdK[A]#λ](x => x))
5656
override def mapK[F[_], G[_]](af: F[A])(fk: F ~> G): G[A] = fk(af)
5757
override def productK[F[_], G[_]](af: F[A], ag: G[A]): Tuple2K[F, G, A] = Tuple2K(af, ag)
5858
override def embed[F[_]: FlatMap](ft: F[F[A]]): F[A] = ft.flatten
@@ -62,8 +62,8 @@ trait RepresentableKInstanceChain[TC[u[_[_]]] >: RepresentableK[u]] {
6262

6363
private[this] def readerTInstance[R, A]: RepresentableK[ReaderT[*[_], R, A]] =
6464
new RepresentableK[ReaderT[*[_], R, A]] {
65-
def tabulate[F[_]](hom: RepK[ReaderT[*[_], R, A], *] ~> F): ReaderT[F, R, A] = ReaderT(r => hom(RepK.mk(_.run(r)))
66-
)
65+
def tabulate[F[_]](hom: RepK[ReaderT[*[_], R, A], *] ~> F): ReaderT[F, R, A] =
66+
ReaderT(r => hom(RepK[ReaderT[*[_], R, A]](_.run(r))))
6767
override def embed[F[_]: FlatMap](ft: F[ReaderT[F, R, A]]): ReaderT[F, R, A] = ReaderT(r => ft.flatMap(_.run(r)))
6868
override def pureK[F[_]](p: Point[F]): ReaderT[F, R, A] = ReaderT(r => p.point[A])
6969
override val unitK: ReaderT[UnitK, R, A] = super.unitK
@@ -78,7 +78,7 @@ trait RepresentableKInstanceChain[TC[u[_[_]]] >: RepresentableK[u]] {
7878
}
7979

8080
private[this] def optionTInstance[A]: RepresentableK[OptionT[*[_], A]] = new RepresentableK[OptionT[*[_], A]] {
81-
def tabulate[F[_]](hom: RepK[OptionT[*[_], A], *] ~> F): OptionT[F, A] = OptionT(hom(RepK.mk(_.value)))
81+
def tabulate[F[_]](hom: RepK[OptionT[*[_], A], *] ~> F): OptionT[F, A] = OptionT(hom(RepK[OptionT[*[_], A]](_.value)))
8282

8383
override def mapK[F[_], G[_]](af: OptionT[F, A])(fk: F ~> G): OptionT[G, A] = af.mapK(fk)
8484
override def productK[F[_], G[_]](af: OptionT[F, A], ag: OptionT[G, A]): OptionT[Tuple2K[F, G, *], A] =
@@ -95,7 +95,7 @@ trait RepresentableKInstanceChain[TC[u[_[_]]] >: RepresentableK[u]] {
9595
private[this] def eitherTInstance[E, A]: RepresentableK[EitherT[*[_], E, A]] =
9696
new RepresentableK[EitherT[*[_], E, A]] {
9797
def tabulate[F[_]](hom: RepK[EitherT[*[_], E, A], *] ~> F): EitherT[F, E, A] =
98-
EitherT(hom(RepK.mk(_.value)))
98+
EitherT(hom(RepK[EitherT[*[_], E, A]](_.value)))
9999

100100
override def mapK[F[_], G[_]](af: EitherT[F, E, A])(fk: F ~> G): EitherT[G, E, A] = af.mapK(fk)
101101
override def productK[F[_], G[_]](af: EitherT[F, E, A], ag: EitherT[G, E, A]): EitherT[Tuple2K[F, G, *], E, A] =
@@ -113,7 +113,7 @@ trait RepresentableKInstanceChain[TC[u[_[_]]] >: RepresentableK[u]] {
113113
private[this] def writerTInstance[W, A]: RepresentableK[WriterT[*[_], W, A]] =
114114
new RepresentableK[WriterT[*[_], W, A]] {
115115

116-
def tabulate[F[_]](hom: RepK[WriterT[*[_], W, A], *] ~> F): WriterT[F, W, A] = WriterT(hom(RepK.mk(_.run)))
116+
def tabulate[F[_]](hom: RepK[WriterT[*[_], W, A], *] ~> F): WriterT[F, W, A] = WriterT(hom(RepK[WriterT[*[_], W, A]](_.run)))
117117

118118
override def mapK[F[_], G[_]](af: WriterT[F, W, A])(fk: F ~> G): WriterT[G, W, A] = af.mapK(fk)
119119
override def productK[F[_], G[_]](af: WriterT[F, W, A], ag: WriterT[G, W, A]): WriterT[Tuple2K[F, G, *], W, A] =
@@ -129,7 +129,7 @@ trait RepresentableKInstanceChain[TC[u[_[_]]] >: RepresentableK[u]] {
129129

130130
private[this] def iorTInstance[E, A]: RepresentableK[IorT[*[_], E, A]] = new RepresentableK[IorT[*[_], E, A]] {
131131

132-
def tabulate[F[_]](hom: RepK[IorT[*[_], E, A], *] ~> F): IorT[F, E, A] = IorT(hom(RepK.mk(_.value)))
132+
def tabulate[F[_]](hom: RepK[IorT[*[_], E, A], *] ~> F): IorT[F, E, A] = IorT(hom(RepK[IorT[*[_], E, A]](_.value)))
133133

134134
override def mapK[F[_], G[_]](af: IorT[F, E, A])(fk: F ~> G): IorT[G, E, A] =
135135
af.mapK(fk)

zio/core/src/main/scala/tofu/zioInstances/ZioTofuInstance.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import java.io.IOException
44

55
import cats.{Applicative, Functor, ~>}
66
import cats.effect.{CancelToken, Fiber}
7-
import tofu.generate.{GenRandom, GenUUID}
7+
import tofu.generate.GenRandom
88
import tofu.internal.CachedMatcher
99
import tofu.lift.Unlift
1010
import tofu.optics.{Contains, Extract}

0 commit comments

Comments
 (0)