-
Notifications
You must be signed in to change notification settings - Fork 78
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
WIP: Law checking & extending IOEffect typeclasses #134
Comments
OK, Ive not made enough progress today and have hit the limits of what my knowledge & timebox can deliver. Closing this issue, reopen if I learn something that can unblock. Concurrent law checks enabled, shows many are failing. Earlier issues with Async laws were resolved with a better |
Stack safety issues might be related to the fact that I couldn't implement it properly for Eff. I think a proper implementation. I think the correct implementation would go along the lines of FreeApplicative which is quite involved. |
The stack safety laws are pretty severe — being required for both left-associated and right-associated Sometimes I wonder if maybe they are too severe, but then there are instances in which we really need it (e.g. with I don't know if it helps, not familiar with your implementation, but make sure to checkout the shenanigans we now have in:
Also note that the laws need validation. It's basically an ongoing process with those laws, so feedback is appreciated. |
This issue is to track some experimental hacking Ive been doing around
Supporting the
ConcurrentEffect
typeclass from cats.effect 0.10 in IOEffect. This is a very speculative, "follow-the-types" implementation and I don't feel confident of its correctness or even sanity - any feedback most welcome. There's some gnarly transient mutable state to work aroundrunIO
s inablity to thread non-Unit
values down the chain, inspired by @etorreborre hint on gitter last NovLaw checking of the Async instance and this new
ConcurrentEffect
using Discipline. On thelaws
branch,cats/test
now runs law checks. One finding was that the existing Async fails 10 law checks, once around stack safety and nine times around seemingly not suspending thrown Throwables.The story behind why I got interested in this area is that I will teach a second Eff workshop at Lambdajam this year. I want to update my material and try to teach whatever is contemporary "best-practice" as at 2018, and I think using cats.effect.IO with Eff would be a nice touch.
However that said, Ive already got the
IO
effect working fine inside Eff stack, so getting these typeclasses law-checked/working is perhaps a bad habit of looking down passing rabbit-holes :PCC @alexandru
The text was updated successfully, but these errors were encountered: