deriving

classy.effect.deriving$
See thederiving companion trait
object deriving extends deriving

Attributes

Companion:
trait
Graph
Supertypes
trait deriving
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Inherited methods

inline def deriveRef[F[_] : Functor, A, B](implicit evidence$1: Functor[F], parent: Ref[F, A], lens: Lens[A, B]): Ref[F, B]

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

Attributes

Inherited from:
deriving