Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data BuildPlan
- construct :: forall m. (Monad m, MonadBaseControl IO m) => MakeActions m -> ([PartialResult Module], [(ModuleName, [ModuleName])]) -> m BuildPlan
- getResult :: MonadBaseControl IO m => BuildPlan -> ModuleName -> m (Maybe (MultipleErrors, ExternsFile))
- collectErrors :: MonadBaseControl IO m => BuildPlan -> m [MultipleErrors]
- collectResults :: MonadBaseControl IO m => BuildPlan -> m (Map ModuleName ExternsFile)
- markComplete :: MonadBaseControl IO m => BuildPlan -> ModuleName -> Maybe (MultipleErrors, ExternsFile) -> Maybe MultipleErrors -> m ()
- needsRebuild :: BuildPlan -> ModuleName -> Bool
Documentation
The BuildPlan tracks information about our build progress, and holds all prebuilt modules for incremental builds.
construct :: forall m. (Monad m, MonadBaseControl IO m) => MakeActions m -> ([PartialResult Module], [(ModuleName, [ModuleName])]) -> m BuildPlan Source #
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)) Source #
Gets the the build result for a given module name independent of whether it was rebuilt or prebuilt. Prebuilt modules always return no warnings.
collectErrors :: MonadBaseControl IO m => BuildPlan -> m [MultipleErrors] Source #
Collects errors for all modules that have been rebuilt. This will block until all outstanding build jobs are finished.
collectResults :: MonadBaseControl IO m => BuildPlan -> m (Map ModuleName ExternsFile) Source #
Collects ExternsFiles for all prebuilt as well as rebuilt modules. Panics if any build job returned an error.
markComplete :: MonadBaseControl IO m => BuildPlan -> ModuleName -> Maybe (MultipleErrors, ExternsFile) -> Maybe MultipleErrors -> m () Source #
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 Source #
Whether or not the module with the given ModuleName needs to be rebuilt