| 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).
- data RefactoringChoice dom
- = NamingRefactoring {
- refactoringName :: String
- namingRefactoring :: RealSrcSpan -> String -> Refactoring dom
- | SelectionRefactoring {
- refactoringName :: String
- selectionRefactoring :: RealSrcSpan -> Refactoring dom
- | ModuleRefactoring { }
- | ProjectRefactoring { }
- = NamingRefactoring {
- performCommand :: [RefactoringChoice dom] -> [String] -> Either FilePath (ModuleDom dom) -> [ModuleDom dom] -> Ghc (Either String [RefactorChange dom])
- refactorCommands :: [RefactoringChoice dom] -> [String]
Documentation
data RefactoringChoice dom Source #
The signature and behavior of one refactoring that can be executed.
Constructors
| NamingRefactoring | |
Fields
| |
| SelectionRefactoring | |
Fields
| |
| ModuleRefactoring | |
Fields
| |
| ProjectRefactoring | |
Fields | |
Arguments
| :: [RefactoringChoice dom] | The set of available refactorings |
| -> [String] | The refactoring command |
| -> Either FilePath (ModuleDom dom) | The module in which the refactoring is performed |
| -> [ModuleDom dom] | Other modules |
| -> Ghc (Either String [RefactorChange dom]) |
Executes a given command (choosen from the set of available refactorings) on the selected module and given other modules.
refactorCommands :: [RefactoringChoice dom] -> [String] Source #
Gets the name of possible refactorings.