Safe Haskell | None |
---|
- data RefactSettings = RefSet {
- rsetGhcOpts :: ![String]
- rsetImportPaths :: ![FilePath]
- rsetExpandSplice :: Bool
- rsetLineSeparator :: LineSeparator
- rsetMainFile :: Maybe [FilePath]
- rsetCheckTokenUtilsInvariant :: !Bool
- rsetVerboseLevel :: !VerboseLevel
- rsetEnabledTargets :: (Bool, Bool, Bool, Bool)
- data VerboseLevel
- defaultSettings :: RefactSettings
- type SimpPos = (Int, Int)
- ifToCase :: RefactSettings -> Cradle -> FilePath -> SimpPos -> SimpPos -> IO [FilePath]
- duplicateDef :: RefactSettings -> Cradle -> FilePath -> String -> SimpPos -> IO [FilePath]
- liftToTopLevel :: RefactSettings -> Cradle -> FilePath -> SimpPos -> IO [FilePath]
- liftOneLevel :: RefactSettings -> Cradle -> FilePath -> SimpPos -> IO [FilePath]
- demote :: RefactSettings -> Cradle -> FilePath -> SimpPos -> IO [FilePath]
- rename :: RefactSettings -> Cradle -> FilePath -> String -> SimpPos -> IO [FilePath]
- swapArgs :: RefactSettings -> Cradle -> [String] -> IO [FilePath]
Data Structures
data RefactSettings Source
RefSet | |
|
Show RefactSettings |
type SimpPos = (Int, Int)
Refactorings
Note: the Cradle
in the type signatures is the one from ghc-mod
ifToCase :: RefactSettings -> Cradle -> FilePath -> SimpPos -> SimpPos -> IO [FilePath]Source
Convert an if expression to a case expression
duplicateDef :: RefactSettings -> Cradle -> 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.
liftToTopLevel :: RefactSettings -> Cradle -> FilePath -> SimpPos -> IO [FilePath]Source
Lift a definition to the top level
liftOneLevel :: RefactSettings -> Cradle -> FilePath -> SimpPos -> IO [FilePath]Source
Move a definition one level up from where it is now
demote :: RefactSettings -> Cradle -> FilePath -> SimpPos -> IO [FilePath]Source
Move a definition one level down
rename :: RefactSettings -> Cradle -> FilePath -> String -> SimpPos -> IO [FilePath]Source
Rename the given identifier.
swapArgs :: RefactSettings -> Cradle -> [String] -> IO [FilePath]Source