Comments (4)
Alright, I'll PR ensuring
(probably under some other name) to ApplicativeError
in cats-core. Once that's in, I'll remove it here.
On the broader topic of discoverability vs implicits… I think that's a dichotomy that we should really figure out how to solve in the tooling layer, and trying to contort our implementations to resolve it seems… incorrect. So whenever it makes sense, removing stuff from IO
and letting the typelcasses do the heavy lifting should be our policy. The exceptions should be primarily in the areas of efficiency (i.e. where we can get a better-than-default implementation by specializing). If we specialize a function, we can just put it concretely on IO
and delegate from the typeclass instance.
from cats-effect.
If the intent is to keep IO
minimal, delegating its functionality to Cats' type-classes, then yes, it makes sense to push that into MonadError
.
from cats-effect.
At the risk of widening this discussion, I'd like to come to a consensus on "keep IO
minimal and teach everyone to import cats.implicits._
" vs. "make a more discoverable IO
and be sad about the redundancies."
from cats-effect.
I think that import cats.implicits._
is fine, because this is meant to be deeply integrated into and piggyback on Cats.
I'm a little selfish, but the reason for why I want this is because I feel that Cats has missing type-classes, or type-classes with incorrectly used operations and pushing more responsability on Cats' type-classes will make Cats-core better.
For example I discovered that ApplicativeError.catchNonFatal
is not being overridden for type-classes that might implement it lazily, like in cats.Eval
, making it next to useless, even though it is being promoted as a lazy Applicative.pure
.
from cats-effect.
Related Issues (20)
- Dispatcher sequential runs queued tasks concurrently when closing HOT 2
- Flakiness in `IOSpec` HOT 1
- better handling of callbacks that might throw in `CallbackStack` HOT 1
- Allow overriding how fatal errors are printed HOT 7
- Improve `MonadCancel` scaladoc HOT 4
- Cancelling `Async` queue `take` makes other `take` hang HOT 5
- `IO#asyncCheckAttempt` is inconsistent with `Async#asyncCheckAttempt`
- Improve contributor documentation HOT 3
- Add (best-effort) stealing API to polling system
- Add API to polling system to attempt to get current poller without shifting HOT 6
- More efficient monitoring of fibers on virtual threads HOT 1
- Published tutorial older than tutorial.md HOT 1
- OutOfMemoryError when IO.uncancelable is used in recursive function HOT 3
- unsafeToFutureCancelable's cancel future completes before setting the result future's cancellation status HOT 7
- unsafeToFuture fails to raise a second InterruptedException if the exception is handled and retried HOT 6
- Support for V8 JavaScript Engine? HOT 2
- IO.onError is inconsistent with ApplicativeError HOT 3
- `AsyncSpec` failure (ciJS)
- When `IORuntime.global` shuts down, it doesn't shut down the WSTP HOT 1
- Queued but unstarted work on `Dispatcher.sequential` should be cancelable HOT 6
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 cats-effect.