Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- apply :: Maybe (Int, Int) -> Bool -> [(String, [Refactoring SrcSpan])] -> Maybe FilePath -> Verbosity -> Module -> IO String
- runRefactoring :: Data a => a -> Refactoring SrcSpan -> StateT Int IO a
- addExtensionsToFlags :: [Extension] -> [Extension] -> FilePath -> DynFlags -> IO (Either String DynFlags)
- parseModuleWithArgs :: LibDir -> ([Extension], [Extension]) -> FilePath -> IO (Either Errors ParsedSource)
- parseExtensions :: [String] -> ([Extension], [Extension], [String])
- data Verbosity
- refactOptions :: EPOptions 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 -> Module -> IO String Source #
Apply a set of refactorings as supplied by hlint
runRefactoring :: Data a => a -> Refactoring SrcSpan -> StateT Int IO a Source #
Peform a Refactoring
.
addExtensionsToFlags :: [Extension] -> [Extension] -> FilePath -> DynFlags -> IO (Either String DynFlags) Source #
parseModuleWithArgs :: LibDir -> ([Extension], [Extension]) -> FilePath -> IO (Either Errors 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 #