A module for running compilable data types that take a list of file paths to compile.
- type Runner e r = r -> [FilePath] -> IO e
- type RunnerExit r = Runner ExitCode r
- (>--) :: Monad m => m ExitCode -> m ExitCode -> m ExitCode
- (>==) :: Monad m => m ExitCode -> m () -> m ()
- pathTransform :: ([FilePath] -> IO [FilePath]) -> Runner x t -> Runner x t
- pathTransform' :: Extensions e => e -> Runner x r -> Runner x r
- (!!!) :: (Command c, CompilePaths c) => RunnerExit c
- (>->) :: (OutputDirectory c, Command c, CompilePaths c) => RunnerExit c
- (->-) :: (OutputDirectory c, Extensions c, CompilePaths c, Command c) => RunnerExit c
- (+>>) :: (OutputReferenceGet r, OutputReferenceSet r) => FilePath -> r -> r
- (++>>) :: (OutputReferenceGet r, OutputReferenceSet r) => [FilePath] -> r -> r
- (>===>) :: (OutputDirectory o, OutputReferenceGet r, OutputReferenceSet r) => o -> r -> r
- (>=>=>) :: (OutputDirectory o, OutputReferenceGet o, OutputReferenceGet r, OutputReferenceSet r) => o -> r -> r
Runners
type RunnerExit r = Runner ExitCode rSource
Chaining Runners
(>--) :: Monad m => m ExitCode -> m ExitCode -> m ExitCodeSource
Applies the second value only if the first produces ExitSuccess
.
(>==) :: Monad m => m ExitCode -> m () -> m ()Source
Executes the second action only if the first produces ExitSuccess
.
Transforming file paths
pathTransform :: ([FilePath] -> IO [FilePath]) -> Runner x t -> Runner x tSource
Transform the list of file paths before executing the runner.
pathTransform' :: Extensions e => e -> Runner x r -> Runner x rSource
Get all file paths with the given file extension (recursively) and execute the runner on those.
Running system command
(!!!) :: (Command c, CompilePaths c) => RunnerExit cSource
(>->) :: (OutputDirectory c, Command c, CompilePaths c) => RunnerExit cSource
Create the output target directory then execute the compile result as a system command.
(->-) :: (OutputDirectory c, Extensions c, CompilePaths c, Command c) => RunnerExit cSource
A runner that recursively searches the output target for files that match a given extension and compiles them as a system command.
Chaining References.
:: (OutputReferenceGet r, OutputReferenceSet r) | |
=> FilePath | The file path to add. |
-> r | The value to add the given file path to. |
-> r | The value with the given file path added. |
Adds the given file path to the reference target of the given value.
:: (OutputReferenceGet r, OutputReferenceSet r) | |
=> [FilePath] | The file paths to add. |
-> r | The value to add the given file paths to. |
-> r | The value with the given file paths added. |
Adds the given file paths to the reference target of the given value.
:: (OutputDirectory o, OutputReferenceGet r, OutputReferenceSet r) | |
=> o | The value with an output target value to add. |
-> r | The value to add the output target to. |
-> r | The value after the output target has been added. |
Adds the (potential) output target of the given value to the output target of the given value.
:: (OutputDirectory o, OutputReferenceGet o, OutputReferenceGet r, OutputReferenceSet r) | |
=> o | The value with an output target and output references to add. |
-> r | The value to add the output target and output references to. |
-> r | The value after the output target has been added. |
Adds the (potential) output target and output references of the given value to the output target of the given value.