-
-
Notifications
You must be signed in to change notification settings - Fork 390
Retrie plugin #103
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
Comments
/cc @xich in case he is already working on this |
Yes, I have been wanting to get to this. And also wondering if it should not be used to make the changes from hlint. |
I'm not working on it myself, but happy to support anyone who does. I would love to see this happen! @alanz Funny you mention hlint. That was the initial motivation for retrie, but I never got back around to doing the integration. I probably will at some point, if someone doesn't beat me to it. |
ping @ndmitchell |
HLint uses the refactor data types - https://hackage.haskell.org/package/refact-0.3.0.2/docs/Refact-Types.html - so all that is required is someone to have those supported in retrie. Note that recently @zliu41 has been working to improve these, and there are some known bugs in apply-refact that we currently use to execute these replacements. |
The That is essentially how I do replacements in CPP files already: ( The API for actually running retrie with a custom handler for https://github.com/facebookincubator/retrie/blob/master/Retrie/Run.hs#L77 See examples of various |
I have started working on Retrie integration in the branch https://github.com/pepeiborra/ide/tree/retrie The branch relies on some upstream changes (facebookincubator/retrie#9) and therefore cannot be merged until those changes are accepted and released. |
Looks like retrie has included @pepeiborra 's changes. From the linked PR:
So... LGTM? |
I want to wait until facebookincubator/retrie#10 lands before resuming this work |
Ah, sorry! Didn’t realize I was blocking you. I’m afk the next couple days, but once I’m back, let’s try to work out the details. |
http://hackage.haskell.org/package/retrie
Retrie is a modern alternative to HaRe, and possibly better maintained as it is used by Facebook.
It can be used to implement refactorings like:
--unfold
--fold
--type-forward
and--type-backward
It could be also used to implement renames and moves, but those would require custom scripts.
The text was updated successfully, but these errors were encountered: