shake-plus-0.0.2.2: Re-export of Shake using well-typed paths and ReaderT.

Safe HaskellNone
LanguageHaskell2010

Development.Shake.Plus.Loaders

Synopsis

Documentation

loadSortFilterApply Source #

Arguments

:: (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.

loadSortFilterApplyW Source #

Arguments

:: (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.