-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel for EitherT and IorT is probably over constrained #3776
Comments
Urgh this is totally my bad. It's because the semantics are taken from |
@djspiewak, how are the derivations you're thinking of more fundamental ? The layering of semantics via a monad stack is interesting because the composition of layers respects the semantics of each layer individually. I'd even go as far as saying that this quality should be a fundamental law to the very concept of monad transformer :
@LukaJCB, I totally agree with these semantics, as a matter of fact, I'm currently facing an actual use-case where Changing the behaviour of |
I think there are three cases to account for :
|
Alright so after a chat with @djspiewak, here's my current state of thoughts (echoing #3777 (comment)):
Therefore I'd be satisfied if there was a way to regain the current semantics. I think I'd favour a non-orphaned instance on a new datatype (or newtype), but if there was an orphan instance that could be accessed easily without colliding with the |
For more discussion on this, see typelevel/cats-effect#1645. The short form is that EitherT and IorT require a Semigroup/Monoid on their error type to derive a Parallel. This gives rise to semantics which are inconsistent with more fundamental derivations of the Parallel type.
At the present moment, it is undecided how best to resolve this, but one possibility is to change the derivations in Cats itself, which is what this issue is now tracking.
The text was updated successfully, but these errors were encountered: