I forked an old version of this plugin since it hadn't been updated in two years. This version is documented and it works, but it doesn't have all of HaRe's features.
First, install HaRe with cabal, viz.
$ cabal new-install HaRe -w ghc-8.0.2
Once that's done, you can install the plugin.
To do so using vim-plug, add
the following to your .vimrc
:
Plug 'vmchale/vim-hare
vim-hare provides keybindings, but you have to activate them yourself. This is
what I have in my .vimrc
:
au BufNewFile,BufRead *.hs nnoremap lu <Plug>LiftHare
:Hreplace newName
- Rename the identifier under the cursor tonewName
:Hlift
- Lift a function to top-level:Happlicative
- Generalize a monadic function to an applicative one