| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.Haskell.Tools.Refactor.Perform
Description
Defines common utilities for using refactorings. Provides an interface for both demo, command line and integrated tools.
- performCommand :: (HasModuleInfo dom, DomGenerateExports dom, OrganizeImportsDomain dom, DomainRenameDefinition dom, ExtractBindingDomain dom, GenerateSignatureDomain dom) => RefactorCommand -> ModuleDom dom -> [ModuleDom dom] -> Ghc (Either String [RefactorChange dom])
- data RefactorCommand
- readCommand :: String -> String -> RefactorCommand
- analyzeCommand :: String -> String -> [String] -> RefactorCommand
Documentation
Arguments
| :: (HasModuleInfo dom, DomGenerateExports dom, OrganizeImportsDomain dom, DomainRenameDefinition dom, ExtractBindingDomain dom, GenerateSignatureDomain dom) | |
| => RefactorCommand | |
| -> ModuleDom dom | The module in which the refactoring is performed |
| -> [ModuleDom dom] | Other modules |
| -> Ghc (Either String [RefactorChange dom]) |
Executes a given command on the selected module and given other modules
data RefactorCommand Source #
A refactoring command
Constructors
| NoRefactor | |
| OrganizeImports | |
| GenerateExports | |
| GenerateSignature RealSrcSpan | |
| RenameDefinition RealSrcSpan String | |
| ExtractBinding RealSrcSpan String |
Instances
readCommand :: String -> String -> RefactorCommand Source #
analyzeCommand :: String -> String -> [String] -> RefactorCommand Source #