Comments (4)
This is not possible. ReaderT[M, A, *] => ReaderT[M, B, *]
requires at least B => M[A]
in the general case.
However supplied code would work with the presence of the following implicit
implicit def subcontext[A, B](implicit lens: A Contains B): WithLocal[ReaderT[IO, A, *], B] =
WithLocal[ReaderT[IO, A, *], A].subcontext(lens)
We may consider adding this to the instance chain for Local
from tofu.
If we add this, we will probably lose type inference for methods that allow one not to specify Ctx but to rely on the (unique-in-scope) F HasContext Ctx
implicit.
from tofu.
Sorry, closed by mistake.
from tofu.
So it's not great in the current form.
But I have that other idea of context-container usable with most of the reader construction to include batteries
from tofu.
Related Issues (20)
- Scala 3 support HOT 2
- Scala 3 tracking Issue HOT 2
- [ZIO2 Logging] simplify FiberRef creation
- add InvariantK instance for Mid
- tofu-kernel-ce3-interop is incompatible with tofu-kernel
- Documentation site is down HOT 3
- Make doc working again
- Generating Documentation Using Github Pages Docs HOT 2
- ZIO's WithRun#runContext fails with an error HOT 1
- Simple quick start not working with ce3
- Suggestion for changing `Logging` hierarchy HOT 2
- Remove unnecessary type places
- Tap's extensions for wrappers syntax (foption, feither)
- Bury `simulacrum` finally HOT 3
- LogTree implementation is unsafe
- Incorrect bracketState implementation HOT 1
- Macro substitution of CE2Kernel does not work on Scala 2.12 HOT 2
- Lost Refs type in tofu.concurrent
- tofu.Clock derivation broken for Ce2
- Conflicting WithContext derivations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tofu.