haskell-tools-refactor-0.1.2.0: Refactoring Tool for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.ExtractBinding

Synopsis

Documentation

extractBinding :: Simple Traversal (Ann Module STWithId) (Ann ValueBind STWithId) -> Simple Traversal (Ann ValueBind STWithId) (Ann Expr STWithId) -> String -> Ann Module STWithId -> RefactoredModule Id Source #

isConflicting :: String -> Ann SimpleName STWithId -> Bool Source #

extractThatBind :: String -> Ann Expr STWithId -> Ann Expr STWithId -> StateT (Maybe (Ann ValueBind STWithId)) (Refactor Id) (Ann Expr STWithId) Source #

addLocalBinding :: SrcSpan -> SrcSpan -> Ann ValueBind STWithId -> ValueBind STWithId -> State Bool (ValueBind STWithId) Source #

insertLocalBind :: SrcSpan -> Ann ValueBind STWithId -> AnnMaybe LocalBinds STWithId -> AnnMaybe LocalBinds STWithId Source #

isParenLikeExpr :: Expr a -> Bool Source #

All expressions that are bound stronger than function application.

doExtract :: String -> Ann Expr STWithId -> Ann Expr STWithId -> StateT (Maybe (Ann ValueBind STWithId)) (Refactor Id) (Ann Expr STWithId) Source #

getExternalBinds :: Ann Expr STWithId -> Ann Expr STWithId -> [Ann Name STWithId] Source #

Gets the values that have to be passed to the extracted definition

generateCall :: String -> [Ann Name STWithId] -> Ann Expr STWithId Source #

Generates the expression that calls the local binding

generateBind :: String -> [Ann Pattern STWithId] -> Ann Expr STWithId -> Ann ValueBind STWithId Source #

Generates the local binding for the selected expression