-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Simplify extracts after running tactics #1351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, based on the new test cases (i am afraid i dont know the tactic plugin code base very well)
@jneira thanks for the bits! I have a preference for tagging you due to how promptly you respond to PRs, but please let me know if it's over too often! |
@TOTBWF mind doing a review of this as well? |
no problem, but i am afraid that i cant do reviews in deep 😟 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR adds a small simplification step after running tactics, which attempts to perform some common Haskell idioms. It will eta reduce expressions, so no more stupid implementations like
fmap (\a -> f a) x
. It also composes functions, so\x -> f (g x)
becomesf . g
instead.The goal is not to be perfect and replace hlint, merely just to get the easy cases.
I'd like to put some real tests on these simplifier functions, but it's not clear to me how to do so. If anyone has any ideas, please let me know!
@TOTBWF please review.