HaRe-0.7.2.7: the Haskell Refactorer.

Safe HaskellNone

Language.Haskell.Refact.HaRe

Contents

Synopsis

Data Structures

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.