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 ()
- shielded :: Act a -> Act a
- data Question
- data Answer
- module Control.Applicative
Patterns and rules.
High-level interface
Monad Act | |
Functor Act | |
Applicative Act | |
MonadIO Act | |
MonadReader Context Act | |
MonadState State Act | |
MonadWriter Written Act |
Mid-level interface
produce :: FilePath -> Act () -> Act ()Source
Produce a file, using with 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.
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 should be independent of the context.
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.
Re-exports
module Control.Applicative