Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines utility methods that prepare Haskell modules for refactoring
- tryRefactor :: (RealSrcSpan -> Refactoring IdDom) -> String -> String -> IO ()
- correctRefactorSpan :: UnnamedModule dom -> RealSrcSpan -> RealSrcSpan
- useFlags :: [String] -> Ghc [String]
- initGhcFlags :: Ghc ()
- initGhcFlagsForTest :: Ghc ()
- initGhcFlags' :: Bool -> Ghc ()
- useDirs :: [FilePath] -> Ghc ()
- deregisterDirs :: [FilePath] -> Ghc ()
- toFileName :: FilePath -> String -> FilePath
- toBootFileName :: FilePath -> String -> FilePath
- getSourceDir :: ModSummary -> IO FilePath
- getModSumOrig :: ModSummary -> FilePath
- loadModule :: String -> String -> Ghc ModSummary
- type TypedModule = Ann UModule IdDom SrcTemplateStage
- parseTyped :: ModSummary -> Ghc TypedModule
- withAlteredDynFlags :: GhcMonad m => (DynFlags -> m DynFlags) -> m a -> m a
- forceCodeGen :: ModSummary -> ModSummary
- forceAsmGen :: ModSummary -> ModSummary
- modSumNormalizeFlags :: ModSummary -> ModSummary
- normalizeFlags :: DynFlags -> DynFlags
- readSrcSpan :: String -> RealSrcSpan
- readSrcLoc :: String -> RealSrcLoc
Documentation
tryRefactor :: (RealSrcSpan -> Refactoring IdDom) -> String -> String -> IO () Source #
correctRefactorSpan :: UnnamedModule dom -> RealSrcSpan -> RealSrcSpan Source #
Adjust the source range to be applied to the refactored module
initGhcFlags :: Ghc () Source #
Initialize GHC flags to default values that support refactoring
initGhcFlagsForTest :: Ghc () Source #
initGhcFlags' :: Bool -> Ghc () Source #
deregisterDirs :: [FilePath] -> Ghc () Source #
toFileName :: FilePath -> String -> FilePath Source #
Translates module name and working directory into the name of the file where the given module should be defined
toBootFileName :: FilePath -> String -> FilePath Source #
Translates module name and working directory into the name of the file where the boot module should be defined
getSourceDir :: ModSummary -> IO FilePath Source #
getModSumOrig :: ModSummary -> FilePath Source #
loadModule :: String -> String -> Ghc ModSummary Source #
Load the summary of a module given by the working directory and module name.
type TypedModule = Ann UModule 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.
withAlteredDynFlags :: GhcMonad m => (DynFlags -> m DynFlags) -> m a -> m a Source #
Modifies the dynamic flags for performing a ghc task
forceCodeGen :: ModSummary -> ModSummary Source #
Forces the code generation for a given module
forceAsmGen :: ModSummary -> ModSummary Source #
Forces ASM code generation for a given module
modSumNormalizeFlags :: ModSummary -> ModSummary Source #
Normalizes the flags for a module summary
normalizeFlags :: DynFlags -> DynFlags Source #
Removes all flags that are unintelligable for refactoring
readSrcSpan :: String -> RealSrcSpan Source #
readSrcLoc :: String -> RealSrcLoc Source #