在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):RefactoringTools/HaRe开源软件地址(OpenSource Url):https://github.com/RefactoringTools/HaRe开源编程语言(OpenSource Language):Haskell 87.3%开源软件介绍(OpenSource Introduction):HaRe : The Haskell RefactorerHome is now https://github.com/RefactoringTools/HaRe HaRe can rename symbols, lift definitions, convert equivalent Haskell constructs like ifs and cases and more while preserving program semantics, types and correctly handling indentation. Only HaRe can execute identity transformation! Note:
LimitationsHaRe will only work for projects using GHC 7.10.2 for compilation. Compiling HaRe with 7.10.2 and then using it against projects using an earlier compiler will not work, as HaRe needs to be able to invoke GHC to the type checker stage on the project using GHC 7.10.2. Getting Started
Check that it works from the command line
Running the bare command lists available refactorings and their parameters Emacs integrationCurrently only emacs integration is offered. Add the following to your ~/.emacs using the load-path entry that matches the installation on your machine.
Add an intializer hook to the ghc-mode command
Alternatively, if using haskell-mode, and initializing via a function
If this is done correctly, there should be an additional The installation can be fine-tuned using
on
Each refactoring will first ask for any information it requires, e.g. a new name if renaming, and then attempt the refactoring. If any precondition is not met this will be reported and the refactoring will abort. If it succeeds, you will be given the option to look at an ediff session to see what changes would be made, and each file can be individually accepted or declined. If the refactoring is commited, the original file is renamed to have a suffix containing the current timestamp. E.g., after renaming in Foo.hs, there will be two files
This allows a sequence of refactorings to be undone manually if required. In theory. VIM integrationSee https://github.com/glittershark/vim-hare Development & SupportJoin in at Note: (2015-10-04) HaRe cannot be tested using stack. It can be built, but the tests will fail, as HaRe makes use of ghc-mod as a library and the interaction between stack, ghc-mod and cabal-helper does not work for the tests. Running test suiteTo run the test suite do:
The See http://hspec.github.io/ for details on hspec see https://travis-ci.org/#alanz/HaRe for continuous build results Resources
Coding styleContributors: please try to follow https://github.com/tibbe/haskell-style-guide Note:A consistent coding layout style is more important than what specific on is used. Contributors
Please put a pull request for this list if you are missing. LogoThe logo was designed by Christi du Toit, https://www.behance.net/christidutoit |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论