-
Notifications
You must be signed in to change notification settings - Fork 346
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
feat: generalize ReaderT instances #1447
Conversation
8ca6fe4
to
c60f108
Compare
bench! |
I think the bang is on the other side. Can I do that? !bench ...guess not. |
!bench |
Here are the benchmark results for commit c60f108. Benchmark Metric Change
========================================
- stdlib task-clock 1% (77.2 σ) |
!bench |
@digama0 Did you find out what was triggering the stack overflow in debug mode? |
No, in the end I ran out of time / patience on debugging and just did black box testing to find the part of the PR that doesn't hit the error. That's also why it scaled back from the original intent (it's not really generalizing the instances anymore, only adding implementations for the missing functions). If we could find the culprit we might be able to do this better later. If you are interested in pursuing this, here's a list of things that cause the error:
The working theory is that inlining these cause lean to be more aggressive about inlining generally for monad stacks including |
Here are the benchmark results for commit ebf5b1a. |
@digama0 Thanks for the explanation. I will try to take a look later at the StackOverflow issue. |
There are no behavioral changes here, only generalizing things like "
ReaderT r m
is an applicative whenm
is" to all the defined semimonad types instead of assumingMonad
for everything.