Closed worekleszczy closed 8 months ago
Check out this PR:
It lets you do something like:
implicit val local1 = Local[App, Context].map(_.one)
implicit val local2 = Local[App, Context].map(_.two)
Unfortunately that PR hasn't been released yet 😅 but I can work on that now. You can use the snapshot in the meantime.
Let me know if that works!
Thank @armanbilge - I've taken a look at the PR you suggested and it seems that it solves precisely the issue I'm having! Can't wait until it's released. I'm closing this issue then 🙃
Hello,
I have a question how to deal with a different ask value requirements in the same monad stack. Imagine a situation that you have 2 actions that require different data accessible by
Ask
typeclass and want to integrate those under a single effectF[_]
eg:I assume that I could create a typeclass instance for both
Ask[F, ContextOne]
andAsk[F, ContextTwo]
based on an instance I get forApp
type, but I just can't shake off the feeling that I'm doing something wrong here 😅. Are there any good practices established for those scenarios? Maybe having twoAsk
typeclasses is, in general, an indication of bad design? Any help would be appreciated 🙃