In the work code, I need to lift a SignallingRef into a trace4cats flow, which requires a SignallingRef[F, A] => F ~> G => SignallingRef[G, A]. Unfortunately, .mapK on SignallingRef[F, A] yields a Ref[G, A]. I implemented a
class TransformedSignallingRef[F[_], G[_], A](underlying: SignallingRef[F, A], fk: F ~> G)(implicit ev: Functor[F])
with essentially the same implementation as TransformedRef in cats-effect, I just can't PR it until I've cleared it with the company. The implementation is totally mechanical, though, so I wouldn't be mad if someone beat me to it before I get that done.
If there's already a way to get this kind of translation done without adding this, I'd also be very happy to hear about it.
In the work code, I need to lift a
SignallingRef
into atrace4cats
flow, which requires aSignallingRef[F, A] => F ~> G => SignallingRef[G, A]
. Unfortunately,.mapK
onSignallingRef[F, A]
yields aRef[G, A]
. I implemented awith essentially the same implementation as
TransformedRef
incats-effect
, I just can't PR it until I've cleared it with the company. The implementation is totally mechanical, though, so I wouldn't be mad if someone beat me to it before I get that done.If there's already a way to get this kind of translation done without adding this, I'd also be very happy to hear about it.
FS2 version: 3.10.2