apply-refact-0.9.2.0: Perform refactorings specified by the refact library.
Safe HaskellNone
LanguageHaskell2010

Refact.Internal

Synopsis

Documentation

apply :: Maybe (Int, Int) -> Bool -> [(String, [Refactoring SrcSpan])] -> Maybe FilePath -> Verbosity -> Anns -> Module -> IO String Source #

Apply a set of refactorings as supplied by hlint

runRefactoring :: Data a => Anns -> a -> AnnKeyMap -> Refactoring SrcSpan -> StateT Int IO (Anns, a, AnnKeyMap) Source #

Peform a Refactoring.

parseExtensions :: [String] -> ([Extension], [Extension], [String]) Source #

Parse the input into (enabled extensions, disabled extensions, invalid input). Implied extensions are automatically added. For example, FunctionalDependencies implies MultiParamTypeClasses, and RebindableSyntax implies NoImplicitPrelude.

The input is processed from left to right. An extension (e.g., StarIsType) may be overridden later (e.g., by NoStarIsType).

Extensions that appear earlier in the input will appear later in the output. Implied extensions appear in the end. If an extension occurs multiple times in the input, the last one is used.

>>> parseExtensions ["GADTs", "RebindableSyntax", "StarIsType", "GADTs", "InvalidExtension", "NoStarIsType"]
([GADTs, RebindableSyntax, GADTSyntax, MonoLocalBinds], [StarIsType, ImplicitPrelude], ["InvalidExtension"])

Support for runPipe in the main process

data Verbosity Source #

Constructors

Silent 
Normal 
Loud 

Instances

Instances details
Eq Verbosity Source # 
Instance details

Defined in Refact.Internal

Ord Verbosity Source # 
Instance details

Defined in Refact.Internal

Show Verbosity Source # 
Instance details

Defined in Refact.Internal