rattle-0.1: Forward build system, with caching and speculation

Safe HaskellNone
LanguageHaskell2010

Development.Rattle

Description

General rules for writing consistent rattle build systems:

  • Never write to the same file twice. Never read then write.
  • Don't delete files that have been produced. Each command should make new files, not delete old files.
Synopsis

Documentation

rattle :: RattleOptions -> Run a -> IO a Source #

Given an Action to run, and a list of previous commands that got run, run it again

data Run a Source #

Type of actions to run. Executed using rattle.

Instances
Monad Run Source # 
Instance details

Defined in Development.Rattle

Methods

(>>=) :: Run a -> (a -> Run b) -> Run b #

(>>) :: Run a -> Run b -> Run b #

return :: a -> Run a #

fail :: String -> Run a #

Functor Run Source # 
Instance details

Defined in Development.Rattle

Methods

fmap :: (a -> b) -> Run a -> Run b #

(<$) :: a -> Run b -> Run a #

Applicative Run Source # 
Instance details

Defined in Development.Rattle

Methods

pure :: a -> Run a #

(<*>) :: Run (a -> b) -> Run a -> Run b #

liftA2 :: (a -> b -> c) -> Run a -> Run b -> Run c #

(*>) :: Run a -> Run b -> Run b #

(<*) :: Run a -> Run b -> Run a #

MonadIO Run Source # 
Instance details

Defined in Development.Rattle

Methods

liftIO :: IO a -> Run a #

data Hazard Source #

Type of exception thrown if there is a hazard when running the build system.

data RattleOptions Source #

Basic options for configuring rattle.

Constructors

RattleOptions 

Fields

cmd :: [String] -> Run () Source #

Run a system command with the given arguments.

parallel :: [Run a] -> Run [a] Source #

Run a sequence of Run actions in parallel. They will be run in parallel with no limit on simultaneous executions.

forP :: (a -> Run b) -> [a] -> Run [b] Source #

Parallel version of forM.

liftIO :: MonadIO m => IO a -> m a #

Lift a computation from the IO monad.