Safe Haskell | None |
---|
Language.Haskell.Refact.HaRe
Contents
- data RefactSettings = RefSet {}
- 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
Constructors
RefSet | |
Fields
|
Instances
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