Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Rule = P (Act ())
- type P = Parser Char
- (==>) :: P x -> (x -> Act a) -> Rule
- data Act a
- cake :: Rule -> Act () -> IO ()
- need :: FilePath -> Act ()
- needs :: [FilePath] -> Act ()
- list :: FilePath -> [Char] -> Act [String]
- produce :: FilePath -> Act () -> Act ()
- produces :: [FilePath] -> Act () -> Act ()
- cut :: Act () -> Act ()
- independently :: [Act a] -> Act ()
- debug :: String -> Act ()
- distill :: Question -> Act Answer -> Act Answer
- fileStamp :: FilePath -> Act Answer
- shielded :: Act a -> Act a
- use :: FilePath -> Act Answer
- updates :: [FilePath] -> Act () -> Act ()
- data Question
- data Answer
- data Failure
- module Control.Applicative
- throwError :: MonadError e m => forall a. e -> m a
Patterns and rules.
(==>) :: P x -> (x -> Act a) -> Rule Source
Primitve for rule construction. The given action must produce files matched by the pattern.
High-level interface
Mid-level interface
independently :: [Act a] -> Act () Source
Low-level interface
distill :: Question -> Act Answer -> Act Answer Source
Answer a question using the action given. The action is encapsulated by the answer. That is, clobbering done by the action will be hidden if the answer to the question turns out the same as in a previous run.
shielded :: Act a -> Act a Source
Run the argument in a clean context, and do not clobber the state even if the argument does that. To use when the construction of the argument actually does not depend on the previous questions asked, and the constructed thing is "atomic" for the environment.
use :: FilePath -> Act Answer Source
Mark that a file is used. Do not chase dependencies on this file though. (To be used eg. if a command uses an optional file).
updates :: [FilePath] -> Act () -> Act () Source
Produce a file, using with the given action. BUT: no problem to produce the same file multiple times.
Re-exports
module Control.Applicative
throwError :: MonadError e m => forall a. e -> m a
Is used within a monadic computation to begin exception processing.