Safe Haskell | None |
---|
- 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
- = CakeError String
- | Panic
- | ProcessError ExitCode
- module Control.Applicative
- throwError :: MonadError e m => forall a. e -> m a
Patterns and rules.
(==>) :: P x -> (x -> Act a) -> RuleSource
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
shielded :: Act a -> Act aSource
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 AnswerSource
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.