shaker-0.4.3: simple and interactive command-line build tool

Shaker.SourceHelper

Contents

Description

Utilities function for compilation and haskell file management

Synopsis

Compile input management

data CompileFile Source

Constructors

CompileFile 

Fields

cfFp :: FilePath
 
cfHasMain :: Bool
 
cfHasTH :: Bool
 

Instances

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

fillCompileInputWithStandardTarget :: CompileInput -> CompileR CompileInputSource

Fill compile input with every haskell files in the project except those containing main and template haskell

GHC Compile management

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

isModuleNeedCompilationSource

Arguments

:: 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