| Copyright | Copyright (C) 2020 Daniel Firth |
|---|---|
| Maintainer | Daniel Firth <dan.firth@homotopic.tech |
| Safe Haskell | None |
| Language | Haskell2010 |
Development.Shake.Plus.Extended.Loaders
Description
License : MIT Stability : experimental
Experimental loaders for shake-plus. Load a collection of FilePatterns as a HashMap.
Synopsis
- batchLoad :: MonadAction m => Path b Dir -> [FilePattern] -> (Path b File -> m a) -> m (HashMap (Path Rel File) a)
- batchLoadWithin :: MonadAction m => Within b [FilePattern] -> (Within b (Path Rel File) -> m a) -> m (Within b (HashMap (Path Rel File) a))
- batchLoadWithin' :: MonadAction m => Within b [FilePattern] -> (Within b (Path Rel File) -> m a) -> m (HashMap (Within b (Path Rel File)) a)
- batchLoadIndex :: (MonadAction m, Indexable ixs x) => (Path Rel File -> m x) -> Path Rel Dir -> [FilePattern] -> m (IxSet ixs x)
- batchLoadIndex' :: (MonadAction m, Indexable ixs x) => Proxy ixs -> (Path Rel File -> m x) -> Path Rel Dir -> [FilePattern] -> m (IxSet ixs x)
Documentation
Arguments
| :: MonadAction m | |
| => Path b Dir | The directory to search in |
| -> [FilePattern] | A filepattern to match against. |
| -> (Path b File -> m a) | A |
| -> m (HashMap (Path Rel File) a) |
Load a directory of FilePatterns via some loading function. This should
be a newCache operation that takes full filepaths.
Arguments
| :: MonadAction m | |
| => Within b [FilePattern] | The directory and filepattern to search. |
| -> (Within b (Path Rel File) -> m a) | A |
| -> m (HashMap (Within b (Path Rel File)) a) |
Like batchLoadWithin', but returns a HashMap containing Within values instead of an Within of a Hashmap.
batchLoadIndex :: (MonadAction m, Indexable ixs x) => (Path Rel File -> m x) -> Path Rel Dir -> [FilePattern] -> m (IxSet ixs x) Source #
Take a loading function and a filepattern and return an IxSet
batchLoadIndex' :: (MonadAction m, Indexable ixs x) => Proxy ixs -> (Path Rel File -> m x) -> Path Rel Dir -> [FilePattern] -> m (IxSet ixs x) Source #
Take a loading function and a filepattern and return an IxSet