Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Haskell.Tools.Refactor.Refactoring
Description
Defines a representation to represent refactorings that can be executed on the codebase. Refactorings are differentiated on their signatures (inputs needed to execute).
Synopsis
- data RefactoringChoice
- = NamingRefactoring { }
- | NamingRefactoringIndent {
- refactoringName :: String
- namingRefactoringIndent :: RealSrcSpan -> String -> Maybe String -> Refactoring
- | SelectionRefactoring { }
- | ModuleRefactoring { }
- | ProjectRefactoring { }
- performCommand :: [RefactoringChoice] -> [String] -> Either FilePath ModuleDom -> [ModuleDom] -> Ghc (Either String [RefactorChange])
- refactorCommands :: [RefactoringChoice] -> [String]
Documentation
data RefactoringChoice Source #
The signature and behavior of one refactoring that can be executed.
Constructors
NamingRefactoring | |
Fields
| |
NamingRefactoringIndent | |
Fields
| |
SelectionRefactoring | |
Fields | |
ModuleRefactoring | |
Fields | |
ProjectRefactoring | |
Fields |
Arguments
:: [RefactoringChoice] | The set of available refactorings |
-> [String] | The refactoring command |
-> Either FilePath ModuleDom | The module in which the refactoring is performed |
-> [ModuleDom] | Other modules |
-> Ghc (Either String [RefactorChange]) |
Executes a given command (choosen from the set of available refactorings) on the selected module and given other modules.
refactorCommands :: [RefactoringChoice] -> [String] Source #
Gets the name of possible refactorings.