Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- apply :: Maybe (Int, Int) -> Bool -> [(String, [Refactoring SrcSpan])] -> Maybe FilePath -> Verbosity -> Anns -> Module -> IO String
- runRefactoring :: Data a => Anns -> a -> AnnKeyMap -> Refactoring SrcSpan -> StateT Int IO (Anns, a, AnnKeyMap)
- addExtensionsToFlags :: [Extension] -> [Extension] -> FilePath -> DynFlags -> IO (Either String DynFlags)
- parseModuleWithArgs :: ([Extension], [Extension]) -> FilePath -> IO (Either Errors (Anns, ParsedSource))
- parseExtensions :: [String] -> ([Extension], [Extension], [String])
- data Verbosity
- rigidLayout :: DeltaOptions
- refactOptions :: PrintOptions Identity String
- type Errors = ErrorMessages
- onError :: String -> Errors -> a
- mkErr :: DynFlags -> SrcSpan -> String -> Errors
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
.
addExtensionsToFlags :: [Extension] -> [Extension] -> FilePath -> DynFlags -> IO (Either String DynFlags) Source #
parseModuleWithArgs :: ([Extension], [Extension]) -> FilePath -> IO (Either Errors (Anns, ParsedSource)) Source #
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
type Errors = ErrorMessages Source #