diff --git a/modules/core/src/main/scala/doobie/util/transactor.scala b/modules/core/src/main/scala/doobie/util/transactor.scala index 5c510acd9..9f64fed94 100644 --- a/modules/core/src/main/scala/doobie/util/transactor.scala +++ b/modules/core/src/main/scala/doobie/util/transactor.scala @@ -300,19 +300,19 @@ object transactor { def interpret[M[_]]: Transactor[M] `Lens` Interpreter[M] = Lens(_.interpret, (a, b) => a.copy(interpret0 = b)) /** @group Lenses */ - def strategy[M[_]]: Transactor[M] `Lens` Strategy = Lens(_.strategy, (a, b) => a.copy(strategy0 = b)) + def strategy[M[_], A]: Transactor.Aux[M, A] `Lens` Strategy = Lens(_.strategy, (a, b) => a.copy(strategy0 = b)) /** @group Lenses */ - def before[M[_]]: Transactor[M] `Lens` ConnectionIO[Unit] = strategy[M] >=> Strategy.before + def before[M[_], A]: Transactor.Aux[M, A] `Lens` ConnectionIO[Unit] = strategy[M, A] >=> Strategy.before /** @group Lenses */ - def after[M[_]]: Transactor[M] `Lens` ConnectionIO[Unit] = strategy[M] >=> Strategy.after + def after[M[_], A]: Transactor.Aux[M, A] `Lens` ConnectionIO[Unit] = strategy[M, A] >=> Strategy.after /** @group Lenses */ - def oops[M[_]]: Transactor[M] `Lens` ConnectionIO[Unit] = strategy[M] >=> Strategy.oops + def oops[M[_], A]: Transactor.Aux[M, A] `Lens` ConnectionIO[Unit] = strategy[M, A] >=> Strategy.oops /** @group Lenses */ - def always[M[_]]: Transactor[M] `Lens` ConnectionIO[Unit] = strategy[M] >=> Strategy.always + def always[M[_], A]: Transactor.Aux[M, A] `Lens` ConnectionIO[Unit] = strategy[M, A] >=> Strategy.always /** Construct a constructor of `Transactor[M, D]` for some `D <: DataSource` When calling this constructor you * should explicitly supply the effect type M e.g. Transactor.fromDataSource[IO](myDataSource, connectEC) diff --git a/modules/example/src/main/scala/example/StreamingCopy.scala b/modules/example/src/main/scala/example/StreamingCopy.scala index 85b5c694d..6818a1332 100644 --- a/modules/example/src/main/scala/example/StreamingCopy.scala +++ b/modules/example/src/main/scala/example/StreamingCopy.scala @@ -87,9 +87,9 @@ object StreamingCopy extends IOApp.Simple { HC.delay(Console.println(s"$tag: $s")) <* _ /** Derive a new transactor that logs stuff. */ - def addLogging[F[_], A](name: String)(xa: Transactor[F]): Transactor[F] = { + def addLogging[F[_], A](name: String)(xa: Transactor.Aux[F, A]): Transactor.Aux[F, A] = { import Transactor.* // bring the lenses into scope - val update: State[Transactor[F], Unit] = + val update: State[Transactor.Aux[F, A], Unit] = for { _ <- before %= printBefore(name, "before - setting up the connection") _ <- after %= printBefore(name, "after - committing")