Utilities function for compilation and haskell file management
- data CompileFile = CompileFile {}
- mergeCompileInputsSources :: [CompileInput] -> CompileInput
- constructCompileFileList :: CompileInput -> IO [CompileFile]
- setAllHsFilesAsTargets :: CompileInput -> CompileR CompileInput
- removeFileWithMain :: CompileInput -> CompileR CompileInput
- removeFileWithTemplateHaskell :: CompileInput -> CompileR CompileInput
- fillCompileInputWithStandardTarget :: CompileInput -> CompileR CompileInput
- initializeGhc :: GhcMonad m => CompileInput -> m ()
- ghcCompile :: GhcMonad m => CompileInput -> m SuccessFlag
- checkUnchangedSources :: [FilePath] -> ModSummary -> IO Bool
- isModuleNeedCompilation :: GhcMonad m => [FilePath] -> ModSummary -> m Bool
Compile input management
data CompileFile Source
mergeCompileInputsSources :: [CompileInput] -> CompileInputSource
Merge source dirs informations from the CompileInput list to create a single CompileInput
constructCompileFileList :: CompileInput -> IO [CompileFile]Source
Build the list of haskell source files located in CompileInput source dirs
Target files filtering
setAllHsFilesAsTargets :: CompileInput -> CompileR CompileInputSource
Configure the CompileInput with all haskell files configured as targets
removeFileWithMain :: CompileInput -> CompileR CompileInputSource
removeFileWithTemplateHaskell :: CompileInput -> CompileR CompileInputSource
fillCompileInputWithStandardTarget :: CompileInput -> CompileR CompileInputSource
Fill compile input with every haskell files in the project except those containing main and template haskell
GHC Compile management
initializeGhc :: GhcMonad m => CompileInput -> m ()Source
ghcCompile :: GhcMonad m => CompileInput -> m SuccessFlagSource
Configure and load targets of compilation. It is possible to exploit the compilation result after this step.
module change detection
checkUnchangedSources :: [FilePath] -> ModSummary -> IO BoolSource
:: GhcMonad m | |
=> [FilePath] | List of modified files |
-> ModSummary | ModSummary to check |
-> m Bool | Result : is the module need to be recompiled |
Check of the module need to be recompile. Modify ghc session by adding the module iface in the homePackageTable