Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- loadSortFilterApply :: (MonadAction m, Ord b) => (Path Rel File -> m a) -> Path Rel Dir -> [FilePattern] -> (a -> b) -> (a -> Bool) -> (a -> a) -> m [(Path Rel File, a)]
- loadSortFilterApplyW :: (MonadAction m, Ord b) => (Within Rel File -> m a) -> Path Rel Dir -> [FilePattern] -> (a -> b) -> (a -> Bool) -> (a -> a) -> m [(Within Rel File, a)]
Documentation
:: (MonadAction m, Ord b) | |
=> (Path Rel File -> m a) | A loading function, (i.e readFile' or a custom `readMarkdownFile, readJPG etc that returns a type you can sort/filter on.) |
-> Path Rel Dir | The path to search in. |
-> [FilePattern] | A filepattern to match on. |
-> (a -> b) | The value to sortOn . |
-> (a -> Bool) | A filtering predicate. |
-> (a -> a) | A simple endotransformation. |
-> m [(Path Rel File, a)] |
Batch loading function. Loads all items detected by the filtepattern and provides parameters
for sorting, filtering and a simple transformation via an endofunction. Returns a list of values
indexed by their source Path
.
:: (MonadAction m, Ord b) | |
=> (Within Rel File -> m a) | A loading function, (i.e readFile' or a custom `readMarkdownFile, readJPG etc that returns a type you can sort/filter on.) |
-> Path Rel Dir | The path to search in. |
-> [FilePattern] | A filepattern to match on. |
-> (a -> b) | The value to sortOn . |
-> (a -> Bool) | A filtering predicate. |
-> (a -> a) | A simple endotransformation. |
-> m [(Within Rel File, a)] |
Like loadSortFilterApply
, but returns Within
values.