You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HaRe is an amazing refactoring tool that I just learned about. It does renaming, promoting and demoting of definitions, etc.
I actually learned about it from an announcement for haskell-tools, which is seeing more activity but only has Atom integration now. On the other hand, a HaRe installation generates some Emacs Lisp (it's not on MELPA yet, which is a problem) which you can autoload in user-config.
I think many people would like Spacemacs support for it: see RefactoringTools/HaRe#7. I've written some bindings for my own use, which are given below. Here's an example: suppose we have this silly code:
original::IO()
original =print val
where
val =if val' ==3then4else5
val' =3
With my cursor on the definition of val, on pressing SPC m e k or , e k (hare-refactor-lift-one), val is extracted as follows:
original::IO()
original =print (val val')
where
val' =3
val val' =if val' ==3then4else5
Here is what I have currently in init.el, in user-config. (I don't know if it's good to load packages there, I'm a noob, haha.) The first few lines are from the HaRe readme.
how well will it play with Intero? Not seeing any trouble so far, but it relies on ghc-mod internally, which I've heard isn't very compatible with Stack.
The text was updated successfully, but these errors were encountered:
I'm not sure how to go about "guessing" the path to the elisp/ directory as I don't have any experience with writing cross-platform-y things like that, especially since there will be people who don't use Stack.
If that could be put into a defvar (I think that's the correct term?) then I could just make a PR by copying my bindings into the existing Haskell layer. I'm not sure what the official Spacemacs stance on non-MELPA stuff is, though. Maybe it could be similar to an optional Flycheck checker in that it'd only be enabled if present?
Sounds good to me. Then experts who are irked by the defvar can fix it up, which is the joy of community driven software dev. Make a positive change, even if it is not perfect.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
HaRe is an amazing refactoring tool that I just learned about. It does renaming, promoting and demoting of definitions, etc.
I actually learned about it from an announcement for haskell-tools, which is seeing more activity but only has Atom integration now. On the other hand, a HaRe installation generates some Emacs Lisp (it's not on MELPA yet, which is a problem) which you can autoload in
user-config
.I think many people would like Spacemacs support for it: see RefactoringTools/HaRe#7. I've written some bindings for my own use, which are given below. Here's an example: suppose we have this silly code:
With my cursor on the definition of
val
, on pressingSPC m e k
or, e k
(hare-refactor-lift-one
),val
is extracted as follows:Here is what I have currently in
init.el
, inuser-config
. (I don't know if it's good to load packages there, I'm a noob, haha.) The first few lines are from the HaRe readme.Other concerns:
ghc-mod
internally, which I've heard isn't very compatible with Stack.The text was updated successfully, but these errors were encountered: