cats.mtl.Stateful can not be derived from Ref because it is not
atomic(https://github.com/typelevel/cats-mtl/pull/1200). Instead, we can use Ref like mtl typeclasses. Ref has
the shape of MTL[_[_], _], it has a good fit to work
cats.mtl.Stateful can not be derived from Ref because it is not
atomic(https://github.com/typelevel/cats-mtl/pull/1200). Instead, we can use Ref like mtl typeclasses. Ref has
the shape of MTL[_[_], _], it has a good fit to work
case class MyCache(httpCache: HttpCache, dbCache: DbCache)
type AppT[A] = EitherT[ReaderT[IO, AppEnv, *], AppError, A]
given Ref[AppT, MyCache] = ...
given Ref[AppT, HttpCache] = deriveRef // Automatically derived via a lens