Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines core combinators for processing files incrementally.
Synopsis
- type Task m = Recipe m ()
- match :: (AchilleIO m, Binary a) => Pattern -> Recipe m FilePath a -> Recipe m c [a]
- match_ :: AchilleIO m => Pattern -> Recipe m FilePath a -> Task m ()
- matchFile :: (AchilleIO m, Binary a) => Pattern -> Recipe m FilePath a -> Recipe m b a
- matchDir :: AchilleIO m => Pattern -> Recipe m FilePath a -> Recipe m c [a]
- with :: (Applicative m, Binary a, Eq a, Binary b) => a -> Recipe m c b -> Recipe m c b
- watch :: (Functor m, Binary a, Eq a) => a -> Recipe m c b -> Recipe m c b
- runTask :: MonadIO m => [Pattern] -> Config -> Task m a -> m a
Documentation
match :: (AchilleIO m, Binary a) => Pattern -> Recipe m FilePath a -> Recipe m c [a] Source #
Run a recipe on every filepath matching a given pattern. The results are cached and the recipe only recomputes when the underlying file has changed since last run.
match_ :: AchilleIO m => Pattern -> Recipe m FilePath a -> Task m () Source #
Run a recipe on every filepath matching a given pattern, and discard the result. Filepaths are cached and the recipe only recomputes when the underlying file has changed since last run.
matchFile :: (AchilleIO m, Binary a) => Pattern -> Recipe m FilePath a -> Recipe m b a Source #
Run a recipe for a filepath matching a given pattern. The result is cached and the recipe only recomputes when the underlying file has changed since last run. Will fail is no file is found matching the pattern.
matchDir :: AchilleIO m => Pattern -> Recipe m FilePath a -> Recipe m c [a] Source #
For every file matching the pattern, run a recipe with the file as input and with the file's parent directory as current working directory. The underlying recipe will be run regardless of whether the file was modified.
with :: (Applicative m, Binary a, Eq a, Binary b) => a -> Recipe m c b -> Recipe m c b Source #
Cache a value and only trigger a given recipe if said value has changed between runs. cache the result of the recipe.