dib-0.7.1: A simple, forward build system.

Safe HaskellNone
LanguageHaskell98

Dib.Gatherers

Description

Module that exposes all of the various GatherStrategy types and functions for dealing with them.

Synopsis

Documentation

data SingleFileGatherer Source #

Gatherer that will return exactly one file.

data DirectoryGatherer Source #

Gatherer that will return all files in a given directory (but not its subdirectories) that pass the filter.

data FileTreeGatherer Source #

Gatherer that will return all files in a given directory tree that pass the filter.

data Gatherer Source #

Existential data type for wrapping GatherStrategys so they can be used as a uniform type.

data CommandGatherer Source #

Gatherer that will run a command and return an empty list. Useful for making clean Targets. Use sparingly.

wrapGatherStrategy :: GatherStrategy s => s -> Gatherer Source #

Convenience function to turn a GatherStrategy into a Gatherer.

runGatherers :: [Gatherer] -> IO [Text] Source #

Runs a list of Gatherers and returns the concatenation of their output.

makeSingleFileGatherer :: Text -> Gatherer Source #

Constructs a Gatherer that returns a single file.

makeDirectoryGatherer :: Text -> FilterFunc -> Gatherer Source #

Constructs a Gatherer that returns all files in a directory (but not its subdirectories) that match a given filter.

makeFileTreeGatherer :: Text -> FilterFunc -> Gatherer Source #

Constructs a Gatherer that returns all files in a directory tree that match a given filter.

makeCommandGatherer :: IO () -> Gatherer Source #

Constructs a Gatherer that runs an arbitrary IO action.

matchAll :: FilterFunc Source #

Filter function that returns all files.

matchExtension :: Text -> FilterFunc Source #

Filter function that returns files with a given extension.

matchExtensionExcluded :: Text -> [Text -> Bool] -> FilterFunc Source #

Filter function that returns files with a given extension that don't match exclusion rules.

matchExtensions :: [Text] -> FilterFunc Source #

Filter function that returns files that match any of a list of extensions.

matchExtensionsExcluded :: [Text] -> [Text -> Bool] -> FilterFunc Source #

Filter function that returns files that match any of a list of extensions, but don't match the exclusion rules.