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 ()
- list :: FilePath -> [Char] -> Act [String]
- produce :: FilePath -> Act () -> Act ()
- produce' :: FilePath -> Act () -> Act Answer
- use :: FilePath -> Act Answer
- overwrote :: FilePath -> Act Answer
- debug :: String -> Act ()
- distill :: Question -> Act Answer -> Act Answer
- fileStamp :: MonadIO m => FilePath -> m Answer
- cut :: 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.
High-level interface
Monad Act | |
Functor Act | |
Applicative Act | |
MonadIO Act | |
MonadError Failure Act | |
MonadReader Context Act | |
MonadState State Act | |
MonadWriter Written Act |
Mid-level interface
produce :: FilePath -> Act () -> Act ()Source
Produce a file, using the given action. The action should be independent of the context.
produce' :: FilePath -> Act () -> Act AnswerSource
Produce a file, using with the given action. The action should be independent of the context. BUT: no problem to produce the same file multiple times.
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).
overwrote :: FilePath -> Act AnswerSource
File was modified by some command, but in a way that does not invalidate previous computations. (This is probably only useful for latex processing).
Low-level interface
distill :: Question -> Act Answer -> Act AnswerSource
Answer a question using the action given. The action must be independent of the context.
Re-exports
module Control.Applicative
throwError :: MonadError e m => forall a. e -> m a
Is used within a monadic computation to begin exception processing.