purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Make.BuildPlan

Synopsis

- data BuildPlan
- data BuildJobResult
  - = BuildJobSucceeded !MultipleErrors !ExternsFile
  - | BuildJobFailed !MultipleErrors
  - | BuildJobSkipped
- buildJobSuccess :: BuildJobResult -> Maybe (MultipleErrors, ExternsFile)
- construct :: MonadBaseControl IO m => MakeActions m -> CacheDb -> ([PartialResult Module], [(ModuleName, [ModuleName])]) -> m (BuildPlan, CacheDb)
- getResult :: MonadBaseControl IO m => BuildPlan -> ModuleName -> m (Maybe (MultipleErrors, ExternsFile))
- collectResults :: MonadBaseControl IO m => BuildPlan -> m (Map ModuleName BuildJobResult)
- markComplete :: MonadBaseControl IO m => BuildPlan -> ModuleName -> BuildJobResult -> m ()
- needsRebuild :: BuildPlan -> ModuleName -> Bool

# Documentation

data BuildPlan #

The BuildPlan tracks information about our build progress, and holds all prebuilt modules for incremental builds.

data BuildJobResult #

Constructors

BuildJobSucceeded !MultipleErrors !ExternsFile | Succeeded, with warnings and externs
BuildJobFailed !MultipleErrors | Failed, with errors
BuildJobSkipped | The build job was not run, because an upstream build job failed

buildJobSuccess :: BuildJobResult -> Maybe (MultipleErrors, ExternsFile) #

construct :: MonadBaseControl IO m => MakeActions m -> CacheDb -> ([PartialResult Module], [(ModuleName, [ModuleName])]) -> m (BuildPlan, CacheDb) #

Constructs a BuildPlan for the given module graph.

The given MakeActions are used to collect various timestamps in order to determine whether a module needs rebuilding.

getResult :: MonadBaseControl IO m => BuildPlan -> ModuleName -> m (Maybe (MultipleErrors, ExternsFile)) #

Gets the the build result for a given module name independent of whether it was rebuilt or prebuilt. Prebuilt modules always return no warnings.

collectResults :: MonadBaseControl IO m => BuildPlan -> m (Map ModuleName BuildJobResult) #

Collects results for all prebuilt as well as rebuilt modules. This will block until all build jobs are finished. Prebuilt modules always return no warnings.

markComplete :: MonadBaseControl IO m => BuildPlan -> ModuleName -> BuildJobResult -> m () #

Called when we finished compiling a module and want to report back the compilation result, as well as any potential errors that were thrown.

needsRebuild :: BuildPlan -> ModuleName -> Bool #

Whether or not the module with the given ModuleName needs to be rebuilt