Skip to content
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

Allow hole filling to deal with recursion #472

Merged
merged 50 commits into from
Oct 19, 2020

Conversation

isovector
Copy link
Collaborator

@TOTBWF and I are back with more! This PR enhances the "attempt to fill hole" code action, allowing it to implement self-recursive functions. The generated code ensures recursion occurs only on structurally-smaller values, and preserves the positional ordering of homomorphically destructed arguments.

It's clever enough to implement foldr:

foldr

and nontrivial functor instances:

tree

@isovector isovector changed the title Allow hole filling to deal with recursion [WIP]: Allow hole filling to deal with recursion Oct 7, 2020
@isovector
Copy link
Collaborator Author

Realized there's more infrastructure work I want to do here before merging. Can't figure out how to turn it into a draft PR, sorry.

(thanks to @i-am-tom for the idea!)
@alanz alanz marked this pull request as draft October 7, 2020 17:21
@alanz
Copy link
Collaborator

alanz commented Oct 7, 2020

I made it a draft, there was a thing on the top right, near where you add reviewers. It looks like plain text, but is clickable

@isovector
Copy link
Collaborator Author

@WorldSEnder would love to have you on board! Feel free to reach out to me (fpslack: isovector, email: sandy@sandymaguire.me) if you're interested in helping.

@isovector isovector changed the title [WIP]: Allow hole filling to deal with recursion Allow hole filling to deal with recursion Oct 16, 2020
@isovector
Copy link
Collaborator Author

isovector commented Oct 16, 2020

No longer WIP, and tests are green. This is mostly tactics-internal changes, though I'd appreciate a review on the changes in plugins/tactics/src/Ide/Plugin/Tactic.hs and those in plugins/tactics/src/Ide/Plugin/Tactic/GHC.hs relating to CPP. @alanz @wz1000

@isovector isovector marked this pull request as ready for review October 16, 2020 23:01
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know the tactic plugin code enough to do a proper review but trusting yours 😃

@isovector isovector merged commit 2533574 into haskell:master Oct 19, 2020
@isovector isovector deleted the recursion branch October 19, 2020 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants