HaRe-0.8.2.1: the Haskell Refactorer.

Safe HaskellNone
LanguageHaskell98

Language.Haskell.Refact.HaRe

Contents

Synopsis

Data Structures

type SimpPos = (Int, Int) Source

Re-exported from ghc-mod

data Options :: *

Instances

Refactorings

ifToCase :: RefactSettings -> Options -> FilePath -> SimpPos -> SimpPos -> IO [FilePath] Source

Convert an if expression to a case expression

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.

liftToTopLevel :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath] Source

Lift a definition to the top level

liftOneLevel :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath] Source

Move a definition one level up from where it is now

demote :: RefactSettings -> Options -> FilePath -> SimpPos -> IO [FilePath] Source

Move a definition one level down

rename :: RefactSettings -> Options -> FilePath -> String -> SimpPos -> IO [FilePath] Source

Rename the given identifier.

roundTrip :: RefactSettings -> Options -> FilePath -> IO [FilePath] Source

Roundtrip the source code, to check that the infrastructure is solid