Safe Haskell | None |
---|---|
Language | Haskell98 |
- data RefactSettings = RefSet {
- rsetVerboseLevel :: !VerboseLevel
- rsetEnabledTargets :: (Bool, Bool, Bool, Bool)
- data VerboseLevel
- defaultSettings :: RefactSettings
- type SimpPos = (Int, Int)
- data Options :: * = Options {
- optOutput :: OutputOpts
- optPrograms :: Programs
- optGhcUserOptions :: [GHCOption]
- optFileMappings :: [(FilePath, Maybe FilePath)]
- defaultOptions :: Options
- ifToCase :: RefactSettings -> Options -> FilePath -> SimpPos -> SimpPos -> IO [FilePath]
- compIfToCase :: FilePath -> SimpPos -> SimpPos -> RefactGhc [ApplyRefacResult]
- duplicateDef :: RefactSettings -> Options -> FilePath -> String -> SimpPos -> IO [FilePath]
- compDuplicateDef :: FilePath -> String -> SimpPos -> RefactGhc [ApplyRefacResult]
- liftToTopLevel :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath]
- compLiftToTopLevel :: FilePath -> SimpPos -> RefactGhc [ApplyRefacResult]
- liftOneLevel :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath]
- compLiftOneLevel :: FilePath -> SimpPos -> RefactGhc [ApplyRefacResult]
- demote :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath]
- compDemote :: FilePath -> SimpPos -> RefactGhc [ApplyRefacResult]
- rename :: RefactSettings -> Options -> FilePath -> String -> SimpPos -> IO [FilePath]
- compRename :: FilePath -> String -> SimpPos -> RefactGhc [ApplyRefacResult]
- roundTrip :: RefactSettings -> Options -> FilePath -> IO [FilePath]
Data Structures
data RefactSettings Source
RefSet | |
|
Re-exported from ghc-mod
data Options :: *
Options | |
|
A default Options
.
Refactorings
ifToCase :: RefactSettings -> Options -> FilePath -> SimpPos -> SimpPos -> IO [FilePath] Source
Convert an if expression to a case expression
compIfToCase :: FilePath -> SimpPos -> SimpPos -> RefactGhc [ApplyRefacResult] Source
duplicateDef :: RefactSettings -> Options -> FilePath -> String -> SimpPos -> IO [FilePath] Source
This refactoring duplicates a definition (function binding or simple pattern binding) at the same level with a new name provided by the user. The new name should not cause name clash/capture.
compDuplicateDef :: FilePath -> String -> SimpPos -> RefactGhc [ApplyRefacResult] Source
liftToTopLevel :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath] Source
Lift a definition to the top level
compLiftToTopLevel :: FilePath -> SimpPos -> RefactGhc [ApplyRefacResult] Source
liftOneLevel :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath] Source
Move a definition one level up from where it is now
compLiftOneLevel :: FilePath -> SimpPos -> RefactGhc [ApplyRefacResult] Source
demote :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath] Source
Move a definition one level down
compDemote :: FilePath -> SimpPos -> RefactGhc [ApplyRefacResult] Source
rename :: RefactSettings -> Options -> FilePath -> String -> SimpPos -> IO [FilePath] Source
Rename the given identifier.
compRename :: FilePath -> String -> SimpPos -> RefactGhc [ApplyRefacResult] Source
Body of the refactoring