buildbox- Rehackable components for writing buildbots and test harnesses.

Safe HaskellSafe-Infered





type Build a = ErrorT BuildError (StateT BuildState IO) aSource

The builder monad encapsulates and IO action that can fail with an error, and also read some global configuration info.


runBuild :: FilePath -> Build a -> IO (Either BuildError a)Source

Run a build command. The first argument is a directory that can be used for temporary files (like "/tmp")

runBuildWithState :: BuildState -> Build a -> IO (Maybe a)Source

Like runBuild but also takes a BuildState.


throw :: BuildError -> Build aSource

Throw an error in the build monad.

needs :: FilePath -> Build ()Source

Throw a needs error saying we needs the given file. A catcher could then usefully create the file, or defer the compuation until it has been created.


io :: IO a -> Build aSource

Lift an IO action into the build monad. If the action throws any exceptions they get caught and turned into ErrorIOError exceptions in our Build monad.


out :: Pretty a => a -> Build ()Source

Print some text to stdout.

outLn :: Pretty a => a -> Build ()Source

Print some text to stdout followed by a newline.