-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A build-system library and driver -- @package cake @version 1.1.0.1 module Cake.Core -- | Rules map names of files to actions building them. type Rule = P (Act ()) type P = Parser Char -- | Primitve for rule construction. The given action must produce files -- matched by the pattern. (==>) :: P x -> (x -> Act a) -> Rule data Act a -- | Run an action in the context of a set of rules. cake :: Rule -> Act () -> IO () -- | Try to build a file using known rules; then mark it as used. need :: FilePath -> Act () needs :: [FilePath] -> Act () -- | List directory contents by extension list :: FilePath -> [Char] -> Act [String] produce :: FilePath -> Act () -> Act () -- | Produce a file, using the given action. produces :: [FilePath] -> Act () -> Act () -- | Run the action in only in a clobbered state cut :: Act () -> Act () independently :: [Act a] -> Act () debug :: String -> Act () -- | 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. distill :: Question -> Act Answer -> Act Answer -- | Return a stamp (hash) for a file fileStamp :: FilePath -> Act Answer -- | 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. shielded :: Act a -> Act a -- | 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). use :: FilePath -> Act Answer -- | Produce a file, using with the given action. BUT: no problem to -- produce the same file multiple times. updates :: [FilePath] -> Act () -> Act () data Question FileContents :: FilePath -> Question Listing :: FilePath -> String -> Question Custom :: [String] -> Question data Answer Stamp :: (Maybe MD5Digest) -> Answer Text :: [String] -> Answer Failed :: Failure -> Answer data Failure CakeError :: String -> Failure Panic :: Failure ProcessError :: ExitCode -> Failure -- | Is used within a monadic computation to begin exception processing. throwError :: MonadError e m => forall a. e -> m a instance Eq Status instance Ord Status instance Functor Act instance Applicative Act instance Monad Act instance MonadIO Act instance MonadState State Act instance MonadWriter Written Act instance MonadReader Context Act instance MonadError Failure Act instance Error Failure instance Show Question instance Binary Answer instance Eq Answer instance Show Answer instance Binary Failure instance Binary ExitCode instance Eq Failure instance Show Failure instance Binary Question instance Eq Question instance Ord Question module Cake.Process processIO :: FilePath -> [String] -> Maybe FilePath -> Maybe FilePath -> Act () system :: [String] -> Act () module Cake.Actions copy :: FilePath -> FilePath -> Act () mkdir :: FilePath -> Act () touch :: FilePath -> Act () remove :: String -> Act () readFile :: FilePath -> Act String dropSpaces :: String -> String -- | Depend on the input file and its dependencies, as given by the 1st -- argument. chaseDeps :: (String -> [FilePath]) -> FilePath -> Act () -- | Depend on the input file and its dependencies. If a file cannot be -- found, do not depend on it. chaseSoftDeps :: (String -> [FilePath]) -> FilePath -> Act () (++?) :: String -> String -> String module Cake.Tex _mpost :: String -> Act () _pdflatex :: String -> Act () _xelatex :: String -> Act () _bibtex :: String -> Act () pandoc :: FilePath -> [Char] -> [String] -> Act () graphviz :: String -> FilePath -> String -> [String] -> Act () -- | Argument of a latex macro argsOf :: [Char] -> [[Char]] -> [[Char]] -- | Find the bib files used in a tex file getBibFiles :: String -> Act Answer includedTex :: String -> [String] includedLhs :: String -> [[Char]] pdflatexBibtex :: FilePath -> Act () _lhs2TeX :: String -> String -> Act () lhs2tex :: [Char] -> Act () module Cake.Rules extension :: String -> P (String, String) anyExtension :: [String] -> P (String, String) simple :: String -> [Char] -> (String -> [Char] -> Act ()) -> Rule tex_markdown_standalone :: Rule pdf_tex :: Rule tex_lhs :: Rule allRules :: Parser Char (Act ()) module Cake.Haskell importedHaskell :: String -> [FilePath] ghcMake :: FilePath -> Act () module Cake.MarXup marxup :: FilePath -> Act () pdflatexMarxup :: FilePath -> Act () pdf_marxup :: FilePath -> Act () module Cake