-
Notifications
You must be signed in to change notification settings - Fork 57
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
Reduce Internal boilerplate #2874
Conversation
8151f1a
to
67fff1e
Compare
67fff1e
to
bfd9e15
Compare
This PR switches to a different lens library and uses more general library functions to implement some traversals over program representation. I think once it's done we should benchmark it to have an idea how this affects performance. |
2006557
to
48a0157
Compare
3da04b1
to
f2ed27b
Compare
afaik the implementation is equivalent so performance should be the same. It's just that
I included the |
There's microlens-pro that provides Prisms / Isos if that's what you need. (this is not an endorsement). |
It's good it doesn't matter, but such things can give you nasty surprises, like with this uniplate thing. Because someone might've implemented some accessor the wrong way, which is say 10x times slower, which makes the whole program say 2x slower because it's used all over the place. But fortunately no nasty surprises here. |
This pr modifies the
HasExpressions
class to allow traversing direct subexpressions rather than only leaf expressions. I've added thelens
library as a dependency to have access to generic traversals defined in Control.Lens.Plated.