refact-0.3.0.2: Specify refactorings to perform with apply-refact

Safe HaskellSafe
LanguageHaskell2010

Refact.Types

Synopsis

Documentation

data SrcSpan Source

A generic SrcSpan, usually this is converted immediately to a native representation. (For example a GHC SrcSpan or a HSE SrcSpan)

Constructors

SrcSpan 

Fields

startLine :: !Int
 
startCol :: !Int
 
endLine :: !Int
 
endCol :: !Int
 

data RType Source

Types of expressions which we are able to replace.

data Refactoring a Source

Supported refactorings

Constructors

Replace 

Fields

rtype :: RType

Type of expression to be replaced

pos :: a

Expression to replace

subts :: [(String, a)]

Substitutions to make

orig :: String

Replacement template

ModifyComment 

Fields

pos :: a

Expression to replace

newComment :: String
 
InsertComment 

Fields

pos :: a

Expression to replace

newComment :: String
 
Delete 

Fields

rtype :: RType

Type of expression to be replaced

pos :: a

Expression to replace

RemoveAsKeyword

Takes the position of a import decl and removes the as keyword

Fields

pos :: a

Expression to replace