Synopsis

# Data Structures

Constructors

 RefSet FieldsrsetVerboseLevel :: !VerboseLevel rsetEnabledTargets :: (Bool, Bool, Bool, Bool)

Instances

 Source # MethodsshowList :: [RefactSettings] -> ShowS #

Constructors

 Debug Normal Off

Instances

 Source # Methods Source # MethodsshowList :: [VerboseLevel] -> ShowS #

type SimpPos = (Int, Int) Source #

## Re-exported from ghc-mod

data Options :: * #

Constructors

 Options FieldsoptOutput :: OutputOpts optPrograms :: Programs optGhcUserOptions :: [GHCOption]GHC command line options set on the ghc-mod command lineoptFileMappings :: [(FilePath, Maybe FilePath)] optEncoding :: String optStackBuildDeps :: Bool

Instances

 MethodsshowList :: [Options] -> ShowS #

A default Options.

# Refactorings

Convert an if expression to a case expression

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.

Lift a definition to the top level

Move a definition one level up from where it is now

Move a definition one level down

Rename the given identifier.

Body of the refactoring

The refactoring removes a user specified formal parameter in a function binding,and the corresponding actual parameters in all calling places of this function. The condition acompanying this refactoring is that the parameter to be removed is not being used. The SimpPos should be somwewhere inside the parameter to be removed

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