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

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor

Description

Defines common utilities for using refactorings. Provides an interface for both demo, command line and integrated tools.

Synopsis

Documentation

useDirs :: [FilePath] -> Ghc () Source #

Use the given source directories

useFlags :: [String] -> Ghc [String] Source #

Set the given flags for the GHC session

initGhcFlags :: Ghc () Source #

Initialize GHC flags to default values that support refactoring

toFileName :: String -> String -> FilePath Source #

Translates module name and working directory into the name of the file where the given module should be defined

toBootFileName :: String -> String -> FilePath Source #

Translates module name and working directory into the name of the file where the boot module should be defined

loadModule :: String -> String -> Ghc ModSummary Source #

Load the summary of a module given by the working directory and module name.

type TypedModule = Ann Module IdDom SrcTemplateStage Source #

The final version of our AST, with type infromation added

parseTyped :: ModSummary -> Ghc TypedModule Source #

Get the typed representation from a type-correct program.

performCommand Source #

Arguments

:: (HasModuleInfo dom, DomGenerateExports dom, OrganizeImportsDomain dom, DomainRenameDefinition dom, ExtractBindingDomain dom, GenerateSignatureDomain dom) 
=> RefactorCommand 
-> ModuleDom dom

The module in which the refactoring is performed

-> [ModuleDom dom]

Other modules

-> Ghc (Either String [RefactorChange dom]) 

Executes a given command on the selected module and given other modules